Learn R Programming

assertive (version 0.1-7)

assert_all_are_existing_files: Does the file exist?

Description

Checks to see if the input files exist.

Usage

assert_all_are_existing_files(x)

  assert_any_are_existing_files(x)

  is_existing_file(x)

Arguments

x
Input to check.

Value

  • is_existing_file wraps file.exists, showing the names of the inputs in the answer. assert_is_existing_file returns nothing but throws an error if is_existing_file returns FALSE.

See Also

file.exists.

Examples

Run this code
assert_all_are_existing_files(dir())
#These examples should fail.
assert_all_are_existing_files("not an existing file (probably)")

Run the code above in your browser using DataLab