Boost logo

Boost :

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]>
To: <boost_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
functionality of
> 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
responsible for
> commercial software used by thousands internationally falling into
> category. So far as we know it has never produced unexpected
> Dylan
> - Auctions
> - 1,000s of Bargains!
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at