Split Full Paths at Slashes into Parts
split_paths(paths, dbg = TRUE, use_fs = FALSE)
vector of character representing full file paths
if TRUE
(default), a debug message is shown
whether or not to simply use path_split
.
Defaults to FALSE
segments <- split_paths(c("path/to/file-1", "path/to/file-2"))
#> Splitting paths ... ok. (0.00s)
segments
#> [[1]]
#> [1] "path" "to" "file-1"
#>
#> [[2]]
#> [1] "path" "to" "file-2"
#>