3 unstable releases
0.2.1 | Jun 26, 2023 |
---|---|
0.2.0 | Nov 4, 2022 |
0.1.0 | Sep 4, 2022 |
#100 in Filesystem
126,153 downloads per month
Used in 68 crates
(27 directly)
6KB
63 lines
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")
);