logical american wrote:
>   Quick question:
> 
> I am trying to use the mkdir() command from sys/stat.h library, but it 
> is blowing up when the directory name has some type of character in it, 
> such as a space character or hyphen.
> 
> What is the command to fix this?  Is activating UTF-8 characters what is 
> needed?  I am using the C++.c_str() to supply the directory name, should 
> I use some IOMANIP function to fix this?
> 
> http://www.opengroup.org/onlinepubs/009695399/functions/mkdir.html 
> doesn't have anything on this, but I do get the ENOENT error.

What arguments are you passing to mkdir()?  Do all elements of the 
path leading up to the new directory name exist?  The following 
program works for me.


#include <sys/stat.h>
#include <sys/types.h>

main()
{
         mkdir("/tmp/foo bar-baz", 0777);
}

-- 
Galen Seitz
[email protected]
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to