Boost logo

Boost :

From: Ross Smith (r-smith_at_[hidden])
Date: 2002-03-27 22:41:40


Dylan Nicholson wrote:
>
> --- Ross Smith <r-smith_at_[hidden]> wrote: > Dylan Nicholson wrote:
> > >
> > > >
> > > access(filename, W_OK) == W_OK?
> >
> > That gives you the access rights for your real user/group id, not your
> > effective user/group id -- i.e. it tells you whether the user running
> > the process can write to the file, not whether the calling process can.
> >
> But it is the only recognised way under POSIX of determining whether a file is
> writable.

But it _doesn't_ determine that.

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 having
it at all.

If is_readonly() doesn't actually tell you whether the file is
read-only, what possible use could it be?

-- 
Ross Smith ...................................... Auckland, New Zealand
r-smith_at_[hidden] ....................................................
  "We need a new cosmology. New gods. New sacraments. Another drink."
                                                       -- Patti Smith

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk