2 unstable releases

0.2.0 Nov 4, 2022
0.1.0 Sep 4, 2022

#353 in Filesystem

Download history 1919/week @ 2023-02-07 2169/week @ 2023-02-14 1883/week @ 2023-02-21 1910/week @ 2023-02-28 2628/week @ 2023-03-07 2089/week @ 2023-03-14 2920/week @ 2023-03-21 2685/week @ 2023-03-28 2432/week @ 2023-04-04 2400/week @ 2023-04-11 2712/week @ 2023-04-18 2696/week @ 2023-04-25 3174/week @ 2023-05-02 3599/week @ 2023-05-09 4569/week @ 2023-05-16 3322/week @ 2023-05-23

14,989 downloads per month
Used in 17 crates (3 directly)

Apache-2.0 OR MIT

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

No runtime deps