fs::exists() question
Hello all, I started using the file system about a week ago in order to port a Windows application using win API calls to manipulate folders and file on Linux. So far it works great but I am having one issue, the fs::exists() function seems to throw an exception when I try to look for directory containing special characters like ./test[0] ./test<1> etc. Is this normal ? I can create directory with these characters using mkdir in Linux so it should be legal names. Any ideas ? Thanks for your time Simon
On 7/11/06, Simon Lacroix
the fs::exists() function seems to throw an exception when I try to look for directory containing special characters like ./test[0] ./test<1> etc. Is this normal ? I can create directory with these characters
Have you checked which exception is being thrown? Odds are good that it's the path checker that's throwing because those names are not valid on some operating systems. (This behaviour is getting removed in 1.34, iirc.) See http://boost.org/libs/filesystem/doc/portability_guide.htm#name_check%AD_fun... for details. You can turn it off by changing the default checker ( http://boost.org/libs/filesystem/doc/path.htm#name_check%AD_mechanism ). ~ SWMc
participants (2)
-
me22
-
Simon Lacroix