Stack-like pop operation for path names

fs_path_pop(path, depth = 1L)

Arguments

path

[character]
Paths.

depth

[integer(1)]
How many parts should be dropped? Default to 1. In this case the function behaves like basename(path).

Value

A character vector.

See also

Other file-system helpers: fs_dirname(), fs_drop_ext()