Trait ergo_fs::PathDirExt
[−]
[src]
pub trait PathDirExt where
Self: AsRef<Path>, { fn walk(&self) -> WalkDir { ... } }
Extension method on the Path
type.
Provided Methods
fn walk(&self) -> WalkDir
Walk the PathDir
, returning the WalkDir
builder.
Examples
use ergo_fs::*; let dir = PathDir::new("src")?; for entry in dir.walk().max_depth(1) { match PathType::from_entry(entry?)? { PathType::File(file) => println!("got file {}", file.display()), PathType::Dir(dir) => println!("got dir {}", dir.display()), } }
Implementors
impl PathDirExt for PathDir