Split Full Paths at Slashes into Parts

split_paths(paths, dbg = TRUE, use_fs = FALSE)

Arguments

paths

vector of character representing full file paths

dbg

if TRUE (default), a debug message is shown

use_fs

whether or not to simply use path_split. Defaults to FALSE

Examples

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"
#>