iso_root_paths: Root paths

Description Usage Arguments Value See Also

View source: R/utils.R

Description

Function to root both relative and absolute paths to a root directory (or directories) commonly relative to current working directory. Determines the best way to shorten relative paths and put absolute paths in a relative context (if possible) using iso_shorten_relative_paths and iso_find_absolute_path_roots, respectively.

Usage

1
iso_root_paths(path, root = ".", check_existence = TRUE)

Arguments

path

vector of file/folder paths, mixed relative and absolute paths are allowed.

root

root directory for the isofiles. Can be relative to the current working directory (e.g. "data") or an absolute path on the file system (e.g. "/Users/..." or "C:/Data/.."). The default is the current working directory ("."). Can be supplied as a vector of same length as the provided paths if the paths have different roots.

check_existence

whether to check for the existence of the paths

Value

a data frame with the root directories and paths relative to the root - order of input paths is preserved

See Also

Other file system functions: iso_expand_paths(), iso_find_absolute_path_roots(), iso_shorten_relative_paths()


isoreader documentation built on Nov. 19, 2021, 1:07 a.m.