Skip to main content

normalize_virtual_path

Function normalize_virtual_path 

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

Returns an absolute POSIX path with . removed and .. resolved, stopping at /. Relative inputs are rooted at /; this never reads the host cwd or follows symlinks. Already normalized paths are borrowed. Validate NUL bytes and length limits first: normalization can remove invalid components and does not provide filesystem confinement.