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.
Examples
paths <- kwb.fakin:::all_path_levels("this/is/a/long/path")
#> Splitting paths ... ok. (0.00s)
kwb.file:::to_subdir_matrix(paths)
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] "this" "" "" "" ""
#> [2,] "this" "is" "" "" ""
#> [3,] "this" "is" "a" "" ""
#> [4,] "this" "is" "a" "long" ""
#> [5,] "this" "is" "a" "long" "path"