3 unstable releases

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

#71 in Filesystem

Download history 21397/week @ 2024-09-10 21396/week @ 2024-09-17 26338/week @ 2024-09-24 29553/week @ 2024-10-01 13929/week @ 2024-10-08 27267/week @ 2024-10-15 22220/week @ 2024-10-22 24992/week @ 2024-10-29 16651/week @ 2024-11-05 46847/week @ 2024-11-12 37544/week @ 2024-11-19 20488/week @ 2024-11-26 38789/week @ 2024-12-03 40213/week @ 2024-12-10 22180/week @ 2024-12-17 9021/week @ 2024-12-24

114,720 downloads per month
Used in 77 crates (32 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