3 unstable releases

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

#106 in Filesystem

Download history 51471/week @ 2024-03-14 51714/week @ 2024-03-21 50224/week @ 2024-03-28 49599/week @ 2024-04-04 49494/week @ 2024-04-11 47002/week @ 2024-04-18 20575/week @ 2024-04-25 18929/week @ 2024-05-02 19031/week @ 2024-05-09 17887/week @ 2024-05-16 17034/week @ 2024-05-23 17292/week @ 2024-05-30 22929/week @ 2024-06-06 19054/week @ 2024-06-13 20667/week @ 2024-06-20 18205/week @ 2024-06-27

83,819 downloads per month
Used in 52 crates (24 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