3 unstable releases

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

#202 in Filesystem

Download history 42720/week @ 2024-01-20 49772/week @ 2024-01-27 48594/week @ 2024-02-03 46986/week @ 2024-02-10 43404/week @ 2024-02-17 45108/week @ 2024-02-24 47043/week @ 2024-03-02 49555/week @ 2024-03-09 51274/week @ 2024-03-16 51535/week @ 2024-03-23 50600/week @ 2024-03-30 48819/week @ 2024-04-06 49824/week @ 2024-04-13 39617/week @ 2024-04-20 19177/week @ 2024-04-27 18470/week @ 2024-05-04

134,728 downloads per month
Used in 46 crates (20 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