Skip to main content

normalize_path

Function normalize_path 

Source
pub fn normalize_path(path: &Path) -> String
Expand description

Normalize a file path for consistent HashMap lookups.

On Windows, Path::canonicalize() and some APIs add a UNC extended-length prefix (\\?\C:\...). Notify (FSW) events may use standard paths (C:\...). This function strips the UNC prefix and converts backslashes to forward slashes so that paths from different sources all map to the same key.