normalize_path

Function normalize_path 

Source
pub(crate) fn normalize_path(
    path: &Path,
    path_type: PathType,
) -> Option<PathBuf>
Expand description

Normalizes a path without performing any filesystem operations.

Returns Some absolute path for absolute input paths. Returns None for relative input paths.

ยงNotes

  • All redundant separator (e.g. /) and parent directory components (i.e. ..) are normalized.
  • Any current directory components (i.e. .) are ignored.
  • This function does not resolve links.