Struct Walk
pub struct Walk { /* private fields */ }
Walk is a recursive directory iterator over file paths in one or more directories.
Only file and directory paths matching the rules are returned. By default,
ignore files like .gitignore are respected. The precise matching rules
and precedence is explained in the documentation for WalkBuilder.
Implementations
impl Walk
fn new<P: AsRef<Path>>(path: P) -> WalkCreates a new recursive directory iterator for the file path given.
Note that this uses default settings, which include respecting
.gitignorefiles. To configure the iterator, useWalkBuilderinstead.fn from_iter<P: AsRef<Path>, I: IntoIterator<Item = P>>(paths: I) -> WalkCreate a new recursive directory iterator from the sequence of paths given.
Note that if the provided iterator is empty, then
Walkis guaranteed to yield zero entries.
Trait Implementations
impl FusedIterator for Walk
impl Iterator for Walk
type Item = Result<DirEntry, Error>;fn next(&mut self) -> Option<Result<DirEntry, Error>>