3 unstable releases

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

#1330 in Filesystem

Download history 65187/week @ 2025-12-11 46561/week @ 2025-12-18 20912/week @ 2025-12-25 44199/week @ 2026-01-01 67823/week @ 2026-01-08 53190/week @ 2026-01-15 50960/week @ 2026-01-22 55195/week @ 2026-01-29 63501/week @ 2026-02-05 81718/week @ 2026-02-12 71969/week @ 2026-02-19 76203/week @ 2026-02-26 111456/week @ 2026-03-05 105063/week @ 2026-03-12 84071/week @ 2026-03-19 103969/week @ 2026-03-26

419,192 downloads per month
Used in 128 crates (49 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