2 unstable releases
0.2.0 | Nov 4, 2022 |
---|---|
0.1.0 | Sep 4, 2022 |
#353 in Filesystem
14,989 downloads per month
Used in 17 crates
(3 directly)
6KB
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")
);