Expand description
Normalizes paths similarly to canonicalize, but without performing I/O.
This is like Python’s os.path.normpath
.
Initially adapted from Cargo’s implementation.
§Example
use normalize_path::NormalizePath;
use std::path::Path;
assert_eq!(
Path::new("/A/foo/../B/./").normalize(),
Path::new("/A/B")
);
Traits§
- Normalize
Path - Extension trait to add
normalize_path
to std’sPath
.