On 10/1/2010 6:14 PM, Galen Seitz wrote: > 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); > } > I have the directory as "/home/myname/Desktop/Items/GPS Summary Files" so there are two space characters in the path name.
_______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
