pub struct DirectoryWalker { /* private fields */ }Expand description
Directory walker with optional ignore filter.
Implementations§
Source§impl DirectoryWalker
impl DirectoryWalker
Sourcepub fn new(config: WalkConfig) -> Self
pub fn new(config: WalkConfig) -> Self
Create a new DirectoryWalker with the given configuration.
Sourcepub fn with_ignore_filter(self, filter: IgnoreFilter) -> Self
pub fn with_ignore_filter(self, filter: IgnoreFilter) -> Self
Set an ignore filter.
Sourcepub fn walk<'a>(
&'a self,
base_dir: &'a Path,
) -> impl Iterator<Item = PathBuf> + 'a
pub fn walk<'a>( &'a self, base_dir: &'a Path, ) -> impl Iterator<Item = PathBuf> + 'a
Walk the directory and yield matching file paths.
Sourcepub fn walk_single(&self, dir: &Path) -> impl Iterator<Item = PathBuf> + '_
pub fn walk_single(&self, dir: &Path) -> impl Iterator<Item = PathBuf> + '_
Walk a single directory (not using patterns).
Auto Trait Implementations§
impl Freeze for DirectoryWalker
impl RefUnwindSafe for DirectoryWalker
impl Send for DirectoryWalker
impl Sync for DirectoryWalker
impl Unpin for DirectoryWalker
impl UnwindSafe for DirectoryWalker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more