expand_path_with

Function expand_path_with 

Source
pub fn expand_path_with<P, Q>(
    path: P,
    relative_to: Q,
    expand_tilde: bool,
) -> PathBuf
where P: AsRef<Path>, Q: AsRef<Path>,
Expand description

Resolve only path components (tilde, ., .., …+), if possible.

The function works in a “best effort” mode: It does not fail but rather returns the unexpanded version if the expansion is not possible.

Furthermore, unlike canonicalize(), it does not use sys calls (such as readlink).

Converts to absolute form but does not resolve symlinks. The input path is specified relative to another path