foundry_common::fs

Function normalize_path

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

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

NOTE: This does not return symlinks and does not touch the filesystem at all (unlike std::fs::canonicalize)

ref: https://github.com/rust-lang/cargo/blob/9ded34a558a900563b0acf3730e223c649cf859d/crates/cargo-util/src/paths.rs#L81