Function replace_slashes

Source
pub fn replace_slashes<P>(path: P) -> PathBuf
where P: AsRef<Path>,
Expand description

Utility function that replaces back slashes \ to forward /. Internally, it converts the input path to string (lossy - see Path::to_string_lossy) and replaces the slashes in the string. Finally, it converts the string to the PathBuf and returns it. This method is intended to be used only for paths, that does not contain non-unicode characters.