This function takes a vector of file paths as input and checks if each file exists. If a file does not exist, the function returns a message indicating which file(s) do(es) not exist.
Value
If stop is TRUE, the function stops and returns a message indicating which file(s) do(es) not exist. If stop is FALSE, the function returns a vector of file paths that do not exist.
Examples
existing <- tempfile("existing-")
file.create(existing)
#> [1] TRUE
missing <- tempfile("missing-")
sn_check_file(c(existing, missing), stop = FALSE)
#> [1] "/tmp/Rtmp9uKaJP/missing-1e8e32564e15"