Trait path_ext::PathExt

source ·
pub trait PathExt {
    // Required methods
    fn slash_str(&self) -> String;
    fn full_str(&self) -> &str;
    fn ext_str(&self) -> &str;
    fn stem_str(&self) -> &str;
    fn name_str(&self) -> &str;
    fn create_parent_dir_all(&self) -> Result<()>;
    fn merge<P: AsRef<Path>>(&self, append: P) -> PathBuf;
    fn is_file(&self) -> bool;
    fn is_dir(&self) -> bool;
    fn walk_dir<F: Fn(&Path) -> bool>(&self, filter: F) -> Vec<PathBuf>;
    fn mkdir_after_remove(&self) -> Result<PathBuf>;
}

Required Methods§

source

fn slash_str(&self) -> String

output full path with slash

e.g. “test\test.txt” -> “test/test.txt”

source

fn full_str(&self) -> &str

output full path with backslash

e.g. “test/test.txt” -> “test\test.txt”

source

fn ext_str(&self) -> &str

source

fn stem_str(&self) -> &str

source

fn name_str(&self) -> &str

source

fn create_parent_dir_all(&self) -> Result<()>

source

fn merge<P: AsRef<Path>>(&self, append: P) -> PathBuf

source

fn is_file(&self) -> bool

source

fn is_dir(&self) -> bool

source

fn walk_dir<F: Fn(&Path) -> bool>(&self, filter: F) -> Vec<PathBuf>

source

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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: AsRef<Path>> PathExt for T