| checkDirectory {checkmate} | R Documentation |
Check for existence and access rights of directories
checkDirectory(x, access = "") assertDirectory(x, access = "", .var.name) testDirectory(x, access = "", .var.name)
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, assertDirectory throws an error message,
testDirectory returns FALSE and checkDirectory returns
a string with the error message.
Other filesystem: assertAccess,
checkAccess, testAccess;
assertFile, checkFile,
testFile;
assertPathForOutput,
checkPathForOutput,
testPathForOutput
# Is R's home directory readable? testDirectory(R.home(), "r") # Is R's home directory readable and writable? testDirectory(R.home(), "rw")