pub struct Condition {
pub extension: Option<String>,
pub extensions: Vec<String>,
pub name_matches: Option<String>,
pub name_regex: Option<String>,
pub size_greater_than: Option<u64>,
pub size_less_than: Option<u64>,
pub age_days_greater_than: Option<u64>,
pub age_days_less_than: Option<u64>,
pub is_directory: Option<bool>,
pub is_hidden: Option<bool>,
}Expand description
Conditions for matching files
Fields§
§extension: Option<String>Match file extension (without dot, e.g., “pdf”)
extensions: Vec<String>Match file extensions (any of these)
name_matches: Option<String>Match filename with glob pattern
name_regex: Option<String>Match filename with regex
size_greater_than: Option<u64>File size greater than (in bytes)
size_less_than: Option<u64>File size less than (in bytes)
age_days_greater_than: Option<u64>File age greater than (in days)
age_days_less_than: Option<u64>File age less than (in days)
is_directory: Option<bool>File is a directory
File is hidden (starts with .)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Condition
impl<'de> Deserialize<'de> for Condition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnsafeUnpin for Condition
impl UnwindSafe for Condition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more