Works for either file or directory paths.
Arguments
- x
character(1)
. File or directory path(s).- access
character(1)
. String containing any of these characters, including in combination:r
: read.w
: write.x
: execute.
Write and executable status cannot be checked on Windows.
Examples
## TRUE ====
hasAccess(c("~", "."))
#> [1] TRUE TRUE
## FALSE ====
hasAccess("xxx")
#> [1] FALSE