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§
sourcefn slash_str(&self) -> String
fn slash_str(&self) -> String
output full path with slash
e.g. “test\test.txt” -> “test/test.txt”
sourcefn full_str(&self) -> &str
fn full_str(&self) -> &str
output full path with backslash
e.g. “test/test.txt” -> “test\test.txt”
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>
Object Safety§
This trait is not object safe.