pub trait PathExt {
// Required methods
fn canonical(&self) -> Result<PathBuf>;
fn abbr(&self) -> String;
fn expanduser(&self) -> PathBuf;
}
Required Methods§
Sourcefn canonical(&self) -> Result<PathBuf>
fn canonical(&self) -> Result<PathBuf>
fs_err::canonicalize
but on windows it doesn’t return UNC paths.
Sourcefn abbr(&self) -> String
fn abbr(&self) -> String
Stringify the path into an abbreviated form.
This replaces the home path with ~
, as well as reducing paths that point into the eggs directory to eggs/rest/of/path
.
Sourcefn expanduser(&self) -> PathBuf
fn expanduser(&self) -> PathBuf
Expands ~
in a path to the home directory.
Implementations on Foreign Types§
Source§impl PathExt for Path
impl PathExt for Path
Source§fn canonical(&self) -> Result<PathBuf>
fn canonical(&self) -> Result<PathBuf>
fs_err::canonicalize
but on windows it doesn’t return UNC paths.
Source§fn abbr(&self) -> String
fn abbr(&self) -> String
Stringify the path into an abbreviated form.
This replaces the home path with ~
, as well as reducing paths that point into the eggs directory to eggs/rest/of/path
.
Source§fn expanduser(&self) -> PathBuf
fn expanduser(&self) -> PathBuf
Expands ~
in a path to the home directory.