Skip to main content

normalize_path

Function normalize_path 

Source
pub fn normalize_path(file_path: &str, repo_root: Option<&str>) -> String
Expand description

Normalize file_path to a lexical repo-relative path.

  • Strips repo_root prefix (with trailing /).
  • Collapses . and .. components lexically (no filesystem access).
  • Does NOT resolve symlinks — memory keys are lexical paths.