path_is_directory: Test if a path is a directory

Description Usage Arguments Examples

View source: R/is_directory.R

Description

Test if a path is a directory. This follows symbolic links, so both path_is_link and path_is_directory can be TRUE for the same oath on systems that support symlinks

Usage

1
path_is_directory(path, missing_is_not_directory = FALSE)

Arguments

path

A vector of paths

missing_is_not_directory

Flag to indicate a return value of FALSE for missing files (not for missing values in path). By default missing files have an value of NA which matches R's NA semantics, but not Python's os.path.isdir function. Pass TRUE in here to set missing files to FALSE (i.e., a missing path is not a directory, rather than having an unknown state of directory-ness).

Examples

1
2
path_is_directory(".") # TRUE
path_is_directory("missing file") # NA

richfitz/pathr documentation built on May 27, 2019, 8:22 a.m.