Function absolute_path_base

Source
pub fn absolute_path_base<'a>(path: &'a Path, base: &Path) -> Cow<'a, Path>
Expand description

Absolutize a given path with the given base.

base is expected to be absoulte!

This function, unlike std::fs::canonicalize does not hit the filesystem and so does not require the input path to exist yet.

Examples: ./somewhere -> /absolute/./somewhere .\somewhere -> C:\somewhere

in the future consider replacing with std::path::absolute once stable