From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-03-28 09:53:16
Here's another cut at it:
What's the point of testing anything in the filesystem since your test
result can always be invalidated by some other process before you get a
chance to use (or even look at) it?
Or, to put it another way, all tests on the filesystem are imperfectly
reliable. However, even an imperfect test can be useful:
if (space_remaining_in_fs() < space_required_to_save)
This approach nearly always saves the process from writing lots of bytes
and discovering it's out of space somewhere in the middle.
----- Original Message -----
From: "Dylan Nicholson" <dylan_nicholson_at_[hidden]>
Sent: Thursday, March 28, 2002 9:36 AM
Subject: Re: [boost] filesystem/directory.hpp header redux
> --- Ross Smith <r-smith_at_[hidden]> wrote: > Dylan Nicholson wrote:
> > The essential point I'm trying to make is that a test that can't be
> > trusted is useless. Unless we can have an is_readonly() test that's
> > _guaranteed_ to always give the right answer, there's no point in
> > it at all.
> Perhaps, but I would still expect to be able to get at the
> access, limited as it may be. To be honest I don't understand why
access is so
> broken (and I've since read similar comments recognising its limited
> usefulness) but it still suffices quite well for a large number of
> applications. Whether is_readonly is the right name I don't know.
> What would be interesting to know is how many boost users have written
> that needs to know if a file is writable or not, and happily (if
> assumed access() did the job. I will admit to being personally
> commercial software used by thousands internationally falling into
> category. So far as we know it has never produced unexpected
> http://www.sold.com.au - SOLD.com.au Auctions
> - 1,000s of Bargains!
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk