Checks if all files exist (or if exists = FALSE do not exist as files or directories).
Arguments
- x
The object to check.
- exists
A flag specifying whether the files/directories must (or must not) exist.
- x_name
A string of the name of object x or NULL.
See also
Other check:
check_data()
,
check_dim()
,
check_dirs()
,
check_key()
,
check_names()
,
check_values()
Examples
check_files(tempfile("unlikely-that-exists-chk"), exists = FALSE)
try(check_files(tempfile("unlikely-that-exists-chk")))
#> Error in eval(expr, envir, enclos) :
#> `tempfile("unlikely-that-exists-chk")` must specify existing files ('/tmp/RtmpvBqZFZ/unlikely-that-exists-chk17fafc01c3d' can't be found).