flatten_path_tree: Flatten path tree

flatten_path_treeR Documentation

Flatten path tree

Description

Flattens a hierarchical list of path elements into a character vector of full paths.

Usage

flatten_path_tree(path_tree, parent_path = NULL)

Arguments

path_tree

Directory tree. A nested list of named lists and character vectors.

parent_path

Optional parent path of path_tree. A character scalar.

Value

A character vector.

See Also

Other path functions: draw_path_tree(), path_mod_time()

Examples

list("root_dir" = list("subdir1",
                       "subdir2" = list("file1.ext"),
                       "file2.ext")) |>
  pal::flatten_path_tree() |>
  pal::cat_lines()

salim-b/pal documentation built on Feb. 28, 2025, 6:51 p.m.