Function git_path::absolutize
source · [−]pub fn absolutize<'a>(
path: impl Into<Cow<'a, Path>>,
current_dir: Option<impl Into<PathBuf>>
) -> Cow<'a, Path>
Expand description
Resolve relative components virtually without accessing the file system, e.g. turn a/./b/c/.././..
into a
,
without keeping intermediate ..
and /a/../b/..
becomes /
.
Note that we might access the current_dir
if we run out of path components to pop off. If unset, we continue
which might lead to an invalid/uninteded path.