pub struct FileDiscovery { /* private fields */ }Expand description
File discovery configuration and operations.
Implementations§
Source§impl FileDiscovery
impl FileDiscovery
Sourcepub const fn new(extensions: Vec<String>, respect_gitignore: bool) -> Self
pub const fn new(extensions: Vec<String>, respect_gitignore: bool) -> Self
Create a new file discovery with given extensions and gitignore setting.
Sourcepub fn discover(&self, paths: &[PathBuf]) -> Result<Vec<PathBuf>>
pub fn discover(&self, paths: &[PathBuf]) -> Result<Vec<PathBuf>>
Discover files matching the configured criteria.
For each path in paths:
- If it’s a file: include if extension matches
- If it’s a directory: recursively find all matching files
§Errors
Returns an error if a path cannot be read or doesn’t exist.
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