| checkAccess {checkmate} | R Documentation |
Check file system access rights
checkAccess(x, access = "") assertAccess(x, access = "", .var.name) testAccess(x, access = "")
x |
[any] |
access |
[ |
.var.name |
[character(1)] |
Depending on the function prefix:
If the check is successful, all functions return TRUE.
If the check is not successful, assertAccess throws an error message,
testAccess returns FALSE and checkAccess returns
a string with the error message.
Other filesystem: assertDirectory,
checkDirectory,
testDirectory; assertFile,
checkFile, testFile;
assertPathForOutput,
checkPathForOutput,
testPathForOutput
# Is R's home directory readable? testAccess(R.home(), "r") # Is R's home directory writeable? testAccess(R.home(), "w")