all_path_levels: All Paths to Parent Folders

View source: R/subtree_for_treejack.R

all_path_levelsR Documentation

All Paths to Parent Folders

Description

For a given path a/b/c/d, all the parent paths a, a/b, a/b/c and the path itself (a/b/c/d) are returned.

Usage

all_path_levels(path)

Arguments

path

one character string representing a file path

Value

vector of character representing all parent paths and the path itself as the last element

Examples

paths <- kwb.fakin:::all_path_levels("this/is/a/long/path")
kwb.file:::to_subdir_matrix(paths)


KWB-R/kwb.fakin documentation built on June 14, 2022, 2 p.m.