Re: split a /path/filename into components



Bernhard Holzmayer wrote:
Eric wrote:


Is there a C library function that can take a path and break it into its
component parts? I think dos has one called fnsplit but i cant seem to
find an equal in the linux world
Thanks
Eric


man 3 dirname
man 3 basename

Hmm, interesting idea. Use dirname/basename to parse a pathname backwards.

Seriously: not a bad idea!

--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett

.



Relevant Pages