pub fn canonicalize_filename<P: AsRef<Path>, Q: AsRef<Path>>(
) -> PathBuf
Gets the canonical file name from
filename. All triple slashes are turned into
single slashes, and all
.s resolved against
Symlinks are not followed, and the returned path is guaranteed to be absolute.
filename is an absolute path,
relative_to is ignored. Otherwise,
relative_to will be prepended to
filename to make it absolute.
must be an absolute path, or
None, it’ll fallback
This function never fails, and will canonicalize file paths even if they don’t exist.
No file system I/O is done.
the name of the file
the relative directory, or
to use the current working directory
a newly allocated string with the canonical file path