Struct fs_more::directory::DirectoryScanOptions
source · pub struct DirectoryScanOptions {
pub maximum_scan_depth: DirectoryScanDepthLimit,
pub follow_symbolic_links: bool,
}Expand description
Options that influence DirectoryScan.
Fields§
§maximum_scan_depth: DirectoryScanDepthLimitThe maximum directory scanning depth, see DirectoryScanDepthLimit.
follow_symbolic_links: boolWhether to follow symbolic links when scanning or not.
§If enabled
We’ll follow the symbolic links, even if they lead outside the base directory_path.
Note that this means the files and directories included in the scan results
might not necessarily be sub-paths of the provided base directory_path.
If a symbolic link turns out to be broken (its destination doesn’t exist), it is simply ignored (not included in the scan results).
§If disabled
When we encounter a symbolic link, the results will include the file path of the symbolic link itself, not the link’s destination path.
If an encountered symbolic link points to a directory, it will be included in the results in a similar manner, but with one significant difference: as we won’t resolve symbolic links, the files and subdirectories of that symlinked directory will not be scanned, even if the scan depth limit would have allowed it.
If a symbolic link turns out to be broken (its destination doesn’t exist), it is simply ignored (not included in the scan results).
Trait Implementations§
source§impl Clone for DirectoryScanOptions
impl Clone for DirectoryScanOptions
source§fn clone(&self) -> DirectoryScanOptions
fn clone(&self) -> DirectoryScanOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for DirectoryScanOptions
impl Debug for DirectoryScanOptions
source§impl Default for DirectoryScanOptions
impl Default for DirectoryScanOptions
source§impl PartialEq for DirectoryScanOptions
impl PartialEq for DirectoryScanOptions
source§fn eq(&self, other: &DirectoryScanOptions) -> bool
fn eq(&self, other: &DirectoryScanOptions) -> bool
self and other values to be equal, and is used
by ==.