I'm using boost 1.52, when i'm trying to get a file from a network drive that i don't have permissions to read from. I get an exception, after using boost::filesystem::exists(fileName)
Is there a work around nicer than just doing try, catch
at every place?
I have switched back for my old code for now:
bool FileExists(const char* fileName) { struct stat my_stat; return (stat(fileName, &my_stat) == 0); } //boost Exists throws exception if there are no permissions for share folder bool FileExists(const std::string& fileName) { return FileExists(fileName.c_str()); }