John Levon <[EMAIL PROTECTED]> writes: | On Sun, Jan 30, 2005 at 10:48:56PM +0100, Lars Gullik Bj?nnes wrote: > >> This patch kills all uses and replace it with calls to >> boost.filesystem (+ a couple of new functions). > | int IsFileWriteable(string const & path) | { | - FileInfo fi(path); | - | - if (fi.access(FileInfo::wperm|FileInfo::rperm)) // read-write | - return 1; | - if (fi.readable()) // read-only | - return 0; | - return -1; // everything else. | + int ret = -1; | + if (fs::is_readable(path)) | + ++ret; | + if (fs::is_writable(path)) | + ++ret; | + return ret; > | Hmm, this doesn't look equivalent?
Hmm... you are right... wronly will also return 1 .. and it should return -1 -- Lgb