file_dir_exist: Confirms Existence of and Separates Files and Directories

Description Usage Arguments Value

View source: R/file_helpers.R

Description

Confirms all paths exist and separates files from directories

Usage

1
file_dir_exist(paths, if_nonexistent = "capture")

Arguments

paths

character vectors containing file or directory paths. Tilde expansion (see path.expand) is done.

if_nonexistent

how to handle paths which do not exist; one of: "capture" = capture nonexistent paths in a named vector in the list "warn" = emit a warning listing paths that do not exist "error" = emit an error listing paths that do not exist

Value

A 2- or 3-vector, named list with: - "file" containing path to files, - "dir" containing path to directories, and - "nonexistent" containing paths that do not exist, if if_nonexistent = "capture"; otherwise paths that do not exist are listed in a warning or error message


allenbaron/JABmisc documentation built on July 4, 2021, 9:56 a.m.