pub struct FileDiscovery { /* private fields */ }Expand description
File discovery engine.
Implementations§
Source§impl FileDiscovery
impl FileDiscovery
Sourcepub fn new(config: DiscoveryConfig) -> Result<Self, DiscoveryError>
pub fn new(config: DiscoveryConfig) -> Result<Self, DiscoveryError>
Create a new file discovery instance.
Sourcepub fn discover(
&self,
paths: &[PathBuf],
) -> Result<Vec<DiscoveredFile>, DiscoveryError>
pub fn discover( &self, paths: &[PathBuf], ) -> Result<Vec<DiscoveredFile>, DiscoveryError>
Discover files from the given paths.
Paths can be:
- Regular files (included directly if matching patterns)
- Directories (walked recursively)
- Glob patterns (expanded)
Sourcepub fn discover_from_stdin(&self) -> Result<Vec<DiscoveredFile>, DiscoveryError>
pub fn discover_from_stdin(&self) -> Result<Vec<DiscoveredFile>, DiscoveryError>
Discover files from stdin (one path per line).
Sourcepub fn discover_from_reader<R: BufRead>(
&self,
reader: R,
) -> Result<Vec<DiscoveredFile>, DiscoveryError>
pub fn discover_from_reader<R: BufRead>( &self, reader: R, ) -> Result<Vec<DiscoveredFile>, DiscoveryError>
Discover files from any BufRead source (for testing).
Sourcepub fn should_include(&self, path: &Path) -> bool
pub fn should_include(&self, path: &Path) -> bool
Check if a single path should be included.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileDiscovery
impl RefUnwindSafe for FileDiscovery
impl Send for FileDiscovery
impl Sync for FileDiscovery
impl Unpin for FileDiscovery
impl UnwindSafe for FileDiscovery
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> 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