# Function cargo_util::paths::normalize_path

source ·

    pub fn normalize_path(path: &Path) -> PathBuf

Expand description

Normalize a path, removing things like `.` and `..`.

CAUTION: This does not resolve symlinks (unlike `std::fs::canonicalize`). This may cause incorrect or surprising behavior at times. This should be used carefully. Unfortunately, `std::fs::canonicalize` can be hard to use correctly, since it can often fail, or on Windows returns annoying device paths. This is a problem Cargo needs to improve on.