is_existing_file: Checks if the path refers to an existing file. Note that this...

View source: R/filesystem.R

is_existing_fileR Documentation

Checks if the path refers to an existing file. Note that this checks for presence of a file. It will fail for directories.

Description

Checks if the path refers to an existing file. Note that this checks for presence of a file. It will fail for directories.

Usage

is_existing_file(path, allow_null = FALSE)

Arguments

path

the path to check

allow_null

if TRUE, allow the path to be NULL. If FALSE (default) do not allow NULL.

Examples

## Not run: 
# For assertion
assertthat::assert_that(qscheck::file_exists(f))
# For check
if (qscheck::file_exists(f)) {}

## End(Not run)



AstraZeneca/qscheck documentation built on Nov. 1, 2023, 4:45 a.m.