Skip to main content

make_relative_path

Function make_relative_path 

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

Strip working directory from file name. The function may fail for one main reason - input path is not valid, does not exist, or there is some other issues with it. The last component of the path is permitted to not exist, so long as the rest of the path exists.