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 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 9028/week @ 2024-12-24 13175/week @ 2024-12-31 40756/week @ 2025-01-07 32183/week @ 2025-01-14 28417/week @ 2025-01-21 32311/week @ 2025-01-28 27504/week @ 2025-02-04

126,383 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