Creating Directories in standard C/C++

Sep 7, 2010 at 6:23am
Hello guys,

I want to create a directory structure from pure C/C++ application without the use of the windows API.

can someone post for me a snippet of code that does such a directory creation.

and I use the visual studio environment for programming (Visual Studio 2008)

Thanks guys.
Last edited on Sep 7, 2010 at 6:24am
Sep 7, 2010 at 1:29pm
You can't do that without the OS's API.
Sep 7, 2010 at 6:48pm
You could always use the C/C++ libraries but they always call Windows API. It's kinda unavoidable.
Sep 7, 2010 at 8:41pm
The Boost Filesystem library provides a nice, OS-neutral interface for this sort of thing.
Sep 7, 2010 at 10:03pm
I wouldn't exactly call it "nice"... but it certainly is comprehensive and OS neutral.


Really my biggest problem with boost is the lack of coherent documentation. The docs available are all just as dense as the source. The filesystem lib in particular is a maze types, and none of the type details are clearly outlined anywhere. I had to do a lot of digging, and trial and error to get it to work.
Sep 8, 2010 at 5:02am
Thanks guys, i have been going through the boost API interface. i think it will be a good alternative
Sep 8, 2010 at 1:41pm
Really my biggest problem with boost is the lack of coherent documentation. The docs available are all just as dense as the source. The filesystem lib in particular is a maze types, and none of the type details are clearly outlined anywhere. I had to do a lot of digging, and trial and error to get it to work.

I've noticed this as well, for some libraries. Others are documented pretty well. Consider contributing some documentation improvements.
Last edited on Sep 8, 2010 at 1:42pm
Topic archived. No new replies allowed.