pub fn path_relative_from(path: &Path, base: &Path) -> Option<PathBuf>
Expand description

Gets the relative path from one directory to another, if it exists. Credit to brson from this commit from 2015 https://github.com/rust-lang/rust/pull/23283/files