access()
Doug Gwyn
gwyn at smoke.brl.mil
Thu Feb 7 06:36:30 AEST 1991
In article <3345 at unisoft.UUCP> greywolf at unisoft.UUCP (The Grey Wolf) writes:
>Sometimes, we only want to verify that a file exists, in which case it
>is more tended to use access() for this.
Yeah, well often it doesn't work, because the wrong permissions are
checked for the path components. The safest way to test for file
existence (on UNIX) is to stat() the presumed pathname and see if
it succeeds.
More information about the Comp.lang.c
mailing list