assert_all_are_on_os_path
Is the path on the OS path?
Is the specified path on the operating system search path?
Usage
assert_all_are_on_os_path(
x,
severity = getOption("assertive.severity", "stop")
)assert_any_are_on_os_path(
x,
severity = getOption("assertive.severity", "stop")
)
is_on_os_path(x, .xname = get_name_in_parent(x))
Arguments
- x
An path to check.
- severity
How severe should the consequences of the assertion be? Either
"stop"
,"warning"
,"message"
, or"none"
.- .xname
Not intended to be used directly.
Value
TRUE
if the specified paths are on the OS search path.
Note
The OS search path is determined with Sys.getenv("path")
. For
files, the path of the containing folder is checked rather than the path of
the file itself.
Examples
# NOT RUN {
is_on_os_path(
c(R.home("bin"), R.home("etc"), "a nonexistent path")
) # probably c(TRUE, FALSE, FALSE)
# }
Community examples
Looks like there are no examples yet.