Usage
check_file(x, exists = TRUE, msg = "error")
Arguments
- x
File name.
- exists
Logical. If TRUE (default), it will check if the files exist.
Otherwise it will check if there is no file of given (x) name.
- msg
Character. Should test print one of warning or error.
Value
If file exists and exists = FALSE it will throw:
Examples
if (FALSE) { # \dontrun{
check_file("new_file.R", exists = FALSE)
check_file("xyz/new_f.R", exists = TRUE)
} # }