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?

john

Reply via email to