#[non_exhaustive]pub struct WalkConfiguration<'p> { /* private fields */ }Expand description
Options controlling recursive traversal with walk.
Implementations§
Source§impl<'p> WalkConfiguration<'p>
impl<'p> WalkConfiguration<'p>
Sourcepub fn noxdev(self) -> Self
pub fn noxdev(self) -> Self
Enable configuration to not traverse mount points.
Note that the mount point directory itself will still be visited
(passed to the callback); only traversal into it is prevented.
To skip mount point directories entirely, use skip_mountpoints.
Sourcepub fn skip_mountpoints(self) -> Self
pub fn skip_mountpoints(self) -> Self
Skip mount point directories entirely during the walk.
When enabled, directories that are mount points will not be visited (the callback will not be invoked for them) and will not be traversed.
This is independent from noxdev – skip_mountpoints
controls whether mount point directories are visited at all, while
noxdev controls whether the walk traverses into directories on
different devices. In practice you may want to use both together.
This option currently only has an effect on Linux.
Sourcepub fn sort_by_file_name(self) -> Self
pub fn sort_by_file_name(self) -> Self
Sort directory entries by file name.
Sourcepub fn path_base(self, base: &'p Path) -> Self
pub fn path_base(self, base: &'p Path) -> Self
Change the inital state for the path. By default the
computed path is relative. This has no effect
on the filesystem traversal - it solely affects
the value of WalkComponent::path.