pub fn parent_dir(rel: &str) -> StringExpand description
The immediate parent directory of a relative path ("." for a root-level
file). Used to group files for the per-folder predicate and --summary dir.
ยงExamples
use coding_tools::tree::parent_dir;
assert_eq!(parent_dir("a/b/c.rs"), "a/b");
assert_eq!(parent_dir("top.rs"), ".");