Mail Archives: djgpp/1998/01/23/14:00:49
On Thu, 22 Jan 1998 18:44:34 +0200 (IST), Eli Zaretskii
<eliz AT is DOT elta DOT co DOT il> wrote:
> On Unix, `access' doesn't predict well the actual
>accessability of files, since it doesn't use the effective user id
>(it's a long story). This makes `access' very non-portable. In
>addition, it is very expensive on some systems.
>
>For those reasons, I would suggest to avoid `access' altogether and
>use `stat' instead. `stat' is POSIX and is therefore much more
>portable, even to DOS compilers such as TC.
I have open in front of me "POSIX Programmer's Guide" page 213
which describes access(). Is the book is wrong?
access() and stat() are equally valid on a POSIX system.
--
Roger
- Raw text -