yolk::util

Trait PathExt

Source
pub trait PathExt {
    // Required methods
    fn canonical(&self) -> Result<PathBuf>;
    fn abbr(&self) -> String;
    fn expanduser(&self) -> PathBuf;
}

Required Methods§

Source

fn canonical(&self) -> Result<PathBuf>

fs_err::canonicalize but on windows it doesn’t return UNC paths.

Source

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

Expands ~ in a path to the home directory.

Implementations on Foreign Types§

Source§

impl PathExt for Path

Source§

fn canonical(&self) -> Result<PathBuf>

fs_err::canonicalize but on windows it doesn’t return UNC paths.

Source§

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

Expands ~ in a path to the home directory.

Implementors§