pub fn normalize_path(path: impl AsRef<Path>) -> Result<PathBuf, FileError>Expand description
Remove . and .. directories from a resource path, without accessing the file system, and replace \ with /. There is no requirement that any part of the path actually exists. The path “.” is returned if the resulting path would otherwise be empty.
Because the file system is not accessed, all paths must be relative to the project root, and this function will return an error if the path tries to go outside of it, such as by .. directories or by being an absolute path.