pub fn path_to_absolute_path(path: &Path, strip_prefix: bool) -> PathBufExpand description
Converts a path to an absolute PathBuf, optionally stripping Windows UNC prefix.
This function canonicalizes the path and optionally removes the Windows \\?\ prefix.
If canonicalization fails (e.g., path doesn’t exist), it returns the path as-is.
§Arguments
path- The path to convertstrip_prefix- Iftrue, removes the Windows\\?\prefix
§Returns
Returns the absolute path, with Windows UNC prefix removed if strip_prefix is true.