library call for directory path creation?
Michael C. Shultz
reso3w83 at verizon.net
Tue Feb 1 13:05:07 PST 2005
On Tuesday 01 February 2005 11:35 am, Louis LeBlanc wrote:
> I know there might be a better place for this question, but here
> I'm working on a utility that has to, among many other things, create
> directory paths, often with a series of parent directories that may
> not already exist. Solaris has mkdirp(3GEN) in the libgen library,
> but I can't find a library call that will do this in FreeBSD. Kind
> of like `mkdir -p` would.
> I know it would be pretty trivial to roll my own, and if I can't find
> it I will. I'm just curious if anyone knows of an *existing* library
> call that would do this.
Assuming your working in C what is wrong with:
char command = "mkdir -p /path/to/whatever";
system( command );
More information about the freebsd-questions