Skip to main content

split_components

Function split_components 

Source
pub fn split_components(raw: &str) -> Vec<&str>
Expand description

_split_components: a candidate path split up, with . and .. resolved.

Never routed through a path type first: Path('a/../b.md').as_posix() keeps the .., so a pattern spelled like the resolved path would not match it.

Candidate separators are normalized on Windows and nowhere else, so a pattern stays one spelling across platforms while a path written the local way still matches. A backslash in a pattern is an escape everywhere, never a separator, which is why this governs only the candidate side.