Expand description
Usage
#no_run
use crate::realpath::realpath;
use std::path::PathBuf;
let src = PathBuf::from("Cargo.toml");
let dest : PathBuf = realpath(&src)?;
println!("{} -> {}", src.display(), dest.display());
Functions
- Takes a PathBuf as input Normalizes it, removes any trailing slashes, intermediate dots, and such Traces symlinks and processes as far as can be canonicalized If only a part of the path is canonicalize-able, then the remaining part is appended as is to the canonicalized part Returns the canonicalized path as a PathBuf Returns an Error if there is some problem with absolutization/canonicalization Error => std::io::Error Only convern : Returns \?\Drive:\path\to\file instead of Drive:\path\to\file on Windows
- Similar to realpath, but will convert \?\Drive:\path\to\file to Drive:\path\to\file if it is possible and valid if
dl=true
But does not convert \?\UNC\server\share\path\to\file to \server\share\path\to\file