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