From: Jan Langer (jan_at_[hidden])
Date: 2002-03-27 11:39:03
On Wed, 27 Mar 2002, Ross Smith wrote:
>Jan Langer wrote:
>> - i would replace the readonly-flag by writable and readable (and also
>> is_readonly by is_readable and is_writeable). this is much clearer.
>I would too if it was practical, but either way it's too hard to
>implement on Unix. (is_readable() would be easy, just try to open it,
>but is_writable() is next to impossible.)
why is is_readable so easy? it is not easier than is_writable since both
set the timestamp of the file.
try to open file
but it does not work because i'm not always allowed to set the time.
btw: the same problem occures at a read_only test.
in my opinion writeable and readable should be in the interface instead
of readonly. and both should be supported whatever it costs ... or we
support none of this flags.
i just looked in my unistd.h (debian/woody) and i see this
/* Test for access to NAME using the effective UID and GID
(as normal file operations use). */
extern int euidaccess (__const char *__name, int __type) __THROW;
perhaps there are similar things on other platforms. and it is not
desireable not to provide a function only because posix has no proper
support for it.
-- jan langer ... jan_at_[hidden] "pi ist genau drei"
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk