Crate realpath

source ·
Expand description

Usage

use realpath::realpath; 
use std::path::PathBuf; 
let src = PathBuf::from("Cargo.toml");
let dest : PathBuf = realpath(&src)?; 
println!("{} -> {}", src, dest); 

Modules

util 🔒

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