file.access {base} | R Documentation |
Utility function to access information about files on the user's file systems.
file.access(names, mode = 0)
names |
character vector containing file names. |
mode |
integer specifying access mode required. |
The mode
value can be the exclusive or of the following values
Permission will be computed for real user ID and real group ID (rather than the effective IDs).
An integer vector with values 0
for success and -1
for failure.
This is intended as a replacement for the S-PLUS function
access
, a wrapper for the C function of the same name, which
explains the return value encoding. Note that
the return value is false for success.
fa <- file.access(dir(".")) table(fa) # count successes & failures