fileAccess {R.utils}R Documentation

Checks the permission of a file

Description

Checks the permission of a file.

Usage

## Default S3 method:
fileAccess(pathname, mode=0, safe=TRUE, ...)

Arguments

pathname A character string of the pathname to be checked.
mode An integer...
safe If TRUE, the permissions are tested more carefully, otherwise file.access() is used.
... Not used.

Details

In R there is file.access() for checking whether the permission of a file. Unfortunately, this function cannot be 100% trusted depending on platform used and file system queried, cf. [1].

Value

Returns an integer; 0 if the permission exists, -1 if not.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

References

[1] R-devel thread file.access() on network (mounted) drive on Windows Vista? on Nov 26, 2008.

See Also

file.access()


[Package R.utils version 1.1.1 Index]