Check that file(s) exist, error if not

cmd_error_if_missing(files)

Arguments

files

list or vector of paths to check

Value

nothing or error message for each missing file

Examples

cmd_error_if_missing(tempdir()) if (FALSE) { # Throws error if file doesn't exist cmd_error_if_missing(file.path(tempdir(), "notreal")) }