Skip to main content

normalize_path

Function normalize_path 

Source
pub fn normalize_path(raw: &str) -> Result<PathBuf, HomeDirError>
Expand description

Normalize a path.

Rules:

  • ~ prefix: expand to user home directory
  • Absolute path: use as-is
  • Other: prepend CWD

ยงErrors

Returns HomeDirError if path normalization fails.