Function nu_path::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).

Does not convert to absolute form nor does it resolve symlinks. The input path is specified relative to another path