
On 2/2/07, Polder, Matthew J
Hi,
I started using filesystem, regex, and bind today. It's been interesting.
I'm using Visual C++ 8.0 on an XP machine that has network filesystems mounted to it, some using letters (H:\, Y:\, etc.), some accessable via two slashes (//linden/temp/, etc). I'd like to peruse these using boost::filesystem.
The following works:
std::string t = "h:\\temp"; boost::filesystem::path p(t, boost::filesystem::native);
but I can't get filesystem to work with the string "h:/temp";
std::string s = p.string(); // s = "h:/temp"
h:/temp doesn't work in windows explorer either. You're mixing windows drive letters with POSIX path separators! Try h:\temp instead.
bool b = boost::filesystem::portable_posix_name(s); //returns false b = boost::filesystem::windows_name(s); //returns false b = boost::filesystem::portable_name(s); //returns false b = boost::filesystem::portable_directory_name(s); //returns false b = boost::filesystem::portbale_file_name(s); //returns false b = boost::filesystem::native(s); //returns false
Also, I'd like to do the following
std::string q = "//linden/temp/"; boost::filesystem::path p2(q);
Again, your slashes are backwards, use \\linden\temp\.
Any help is appreciated.
thanks, matthew
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users