file_path: Create a file path and/or check if it exists

Description Usage Arguments Value Examples

View source: R/file_path.R

Description

Creates a file path and also can check/force it to exists in one step. Used mostly in conjunction with here::here, for checking whether a file exists (you've typed the path correctly).

Usage

1
file_path(..., check_exists = TRUE, force_exists = FALSE)

Arguments

...

passed to base::file.path.

check_exists

logical(1) specifying whether to print the path and if it exists locally.

force_exists

logical(1) specifying whether to return an error if the path does not exist.

Value

file path

Examples

1
file_path("/")

dzhang32/rutils documentation built on Feb. 10, 2022, 9:12 p.m.