realpath

Function realpath 

Source
pub fn realpath<P: AsRef<Path>>(
    path: P,
    flags: RealpathFlags,
) -> Result<PathBuf>
Expand description

Canonicalize the given path.

This is effectively a wrapper around realpath_raw() that allocates a buffer; see that function’s documentation for details.

Note that on non-WASI OSes, this function is limited to resolving paths of PATH_MAX bytes. See RealpathBuilder for more information.