Skip to main content

normalize_lexical_path

Function normalize_lexical_path 

Source
pub fn normalize_lexical_path(path: &Path) -> Cow<'_, Path>
Expand description

Normalizes lexical aliases that the target platform treats as the same path.

This removes current-directory components without resolving parent traversal. On Windows it also converts supported verbatim/device drive and UNC prefixes to their ordinary spelling. Unsupported device namespaces are otherwise preserved. The function performs no filesystem I/O.