Skip to main content

normalize_and_clean

Function normalize_and_clean 

Source
pub fn normalize_and_clean<'a>(
    path: Cow<'a, Path>,
    current_dir: &Path,
) -> Option<Cow<'a, Path>>
Expand description

Like normalize(), but also removes . components and duplicate or trailing separators.

If cleaning leaves no components, current_dir is returned. Already-clean borrowed paths remain borrowed.