Trait path_dedot::ParseDot

source ·
pub trait ParseDot {
    // Required methods
    fn parse_dot(&self) -> Result<Cow<'_, Path>>;
    fn parse_dot_from(&self, cwd: impl AsRef<Path>) -> Result<Cow<'_, Path>>;
}
Expand description

Let Path and PathBuf have parse_dot method.

Required Methods§

source

fn parse_dot(&self) -> Result<Cow<'_, Path>>

Remove dots in the path and create a new PathBuf instance on demand.

source

fn parse_dot_from(&self, cwd: impl AsRef<Path>) -> Result<Cow<'_, Path>>

Remove dots in the path and create a new PathBuf instance on demand. It gets the current working directory as the second argument.

Implementations on Foreign Types§

source§

impl ParseDot for Path

source§

fn parse_dot(&self) -> Result<Cow<'_, Path>>

source§

fn parse_dot_from(&self, cwd: impl AsRef<Path>) -> Result<Cow<'_, Path>>

source§

impl ParseDot for PathBuf

source§

fn parse_dot(&self) -> Result<Cow<'_, Path>>

source§

fn parse_dot_from(&self, cwd: impl AsRef<Path>) -> Result<Cow<'_, Path>>

Implementors§