Function folder

Source
pub fn folder(path: &str) -> &str
Expand description

Containing directory of a path, without its trailing separator.

Empty when the path has no directory part at all — a bare file name is in no folder, and inventing "." here would group it with every other path that has no folder either.