is there a function which creates all the nonexisting directories in a given path?
is there a function which creates all the nonexisting directories in a given path?
What system are you using? If it's Unix, here is an example:
For some other unix functions look hereCode:#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> //... mkdir("./path/to/my/dir", 0777);
There is something similar in Windows, too. Here is an example for VC++:
Look here for more examples and explanations for VC++.Code:#include <direct.h> //... _mkdir("\\mydir");
The OS requirements were Windows Vista Ultimate or better, so we used Linux.
the page on msdn's about CreateDirectory function isn't available so here's an alternative link
http://www.answers.com/topic/createdirectory-win-api
Last edited by xErath; 05-20-2005 at 08:31 PM.
but CreateDirectory() doesn't create more than one directory at a time.
nvm, i created a function which does what i want, thanks