|
Boost : |
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2007-04-13 12:36:05
Hi all,
What's the rationale of throwing an exception from
boost::filesystem::exists(somepath); when 'somepath' exists but is locked by
some other process (at least on Windows)? A simple way to reproduce the
effect is:
#include <iostream>
#include <boost/filesystem.hpp>
int main()
{
boost::filesystem::path p("C:\\pagefile.sys");
try {
boost::filesystem::exists(p);
}
catch (...) {
std::cerr << "Ooops..." << std::endl;
}
return 0;
}
Throwing an exception doesn't seem to be the right thing here, since the
file actually exists, so I'ld expect to get a 'true' back from exists().
Regards Hartmut
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk