foundry_common::fs

Function canonicalize_path

Source
pub fn canonicalize_path(path: impl AsRef<Path>) -> Result<PathBuf>
Expand description

Canonicalize a path, returning an error if the path does not exist.

Mainly useful to apply canonicalization to paths obtained from project files but still error properly instead of flattening the errors.