Skip to main content

normalize_path

Function normalize_path 

Source
pub fn normalize_path(path: &Path) -> PathBuf
Expand description

Normalize a path by resolving . and .. components without requiring the file to exist on disk (unlike std::fs::canonicalize).

Guards against excessive .. that would pop past the root by only popping Normal components (never RootDir or Prefix).