3 unstable releases

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

#91 in Filesystem

Download history 21574/week @ 2024-10-21 25526/week @ 2024-10-28 16035/week @ 2024-11-04 42686/week @ 2024-11-11 41308/week @ 2024-11-18 19487/week @ 2024-11-25 38347/week @ 2024-12-02 36432/week @ 2024-12-09 29117/week @ 2024-12-16 8080/week @ 2024-12-23 12808/week @ 2024-12-30 37847/week @ 2025-01-06 35727/week @ 2025-01-13 26801/week @ 2025-01-20 32032/week @ 2025-01-27 30215/week @ 2025-02-03

125,809 downloads per month
Used in 79 crates (33 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