
1 Feb
2007
1 Feb
'07
8:17 p.m.
Richard Dingwall
On 2/2/07, Polder, Matthew J
wrote: (...) 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.
Well, at least on any NT based system I've worked yet h:/temp is synonym with h:\temp. AFAIK on Windows / and \ are mostly equivalent as path separators (I'm not sure about the \\computername syntax, but for local paths / mapped network drives it just works). Best regards, Markus
(...)