Trait normalize_path::NormalizePath
source · pub trait NormalizePath {
fn normalize(&self) -> PathBuf;
fn is_normalized(&self) -> bool;
}Expand description
Extension trait to add normalize_path to std’s Path.
Required Methods
sourcefn normalize(&self) -> PathBuf
fn normalize(&self) -> PathBuf
Normalize a path without performing I/O.
All redundant separator and up-level references are collapsed.
However, this does not resolve links.
sourcefn is_normalized(&self) -> bool
fn is_normalized(&self) -> bool
Return true if the path is normalized.
Quirk
If the path does not start with ./ but contains ./ in the middle,
then this function might returns true.