[−][src]Struct dia_files::path_filter::All
A filter that combines all filters you provide, using logical conjunction
Notes
- If you provide an empty list, this filter rejects all paths.
- Files are only accepted if all filters accept them.
Examples
To find all Rust source files, ignoring vesion control systems' and build directories:
use std::path::PathBuf; use dia_files::path_filter::{All, Filter, IgnoredDirNames, SomeFileExts}; const IGNORED_DIR_NAMES: &[&str] = &[ ".git", ".hg", ".svn", ".gradle", "target", "build", "release", "debug", ]; const FILE_EXTS: &[&str] = &["rs"]; let dir = PathBuf::from(file!()).parent().unwrap().to_path_buf(); let filters: Vec<Box<Filter>> = vec![ Box::new(IgnoredDirNames::new(IGNORED_DIR_NAMES)), Box::new(SomeFileExts::new(FILE_EXTS)), ]; let filter = All::new(filters); assert!(dia_files::find_files(dir, false, filter).unwrap().count() > 0);
Methods
impl All
[src]
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,