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: DirectoryScanDepthLimit

The maximum directory scanning depth, see DirectoryScanDepthLimit.

§follow_symbolic_links: bool

Whether 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

source§

fn clone(&self) -> DirectoryScanOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DirectoryScanOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DirectoryScanOptions

source§

fn default() -> Self

Returns the default directory scanning options, which are:

  • unlimited scan depth,
  • symlinks are no followed.
source§

impl PartialEq for DirectoryScanOptions

source§

fn eq(&self, other: &DirectoryScanOptions) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for DirectoryScanOptions

source§

impl StructuralPartialEq for DirectoryScanOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.