3 unstable releases

0.2.1 Jun 26, 2023
0.2.0 Nov 4, 2022
0.1.0 Sep 4, 2022

#100 in Filesystem

Download history 23890/week @ 2024-08-09 20154/week @ 2024-08-16 29072/week @ 2024-08-23 19320/week @ 2024-08-30 28142/week @ 2024-09-06 16372/week @ 2024-09-13 27599/week @ 2024-09-20 33252/week @ 2024-09-27 15053/week @ 2024-10-04 22659/week @ 2024-10-11 24208/week @ 2024-10-18 23353/week @ 2024-10-25 18232/week @ 2024-11-01 32190/week @ 2024-11-08 49771/week @ 2024-11-15 19459/week @ 2024-11-22

126,153 downloads per month
Used in 68 crates (27 directly)

Apache-2.0 OR MIT

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")
);

No runtime deps