pub struct FileDiscovery { /* private fields */ }Expand description
File discovery engine for scanning and classifying media files.
Implementations§
Source§impl FileDiscovery
impl FileDiscovery
Sourcepub fn scan_directory(
&self,
root_path: &Path,
recursive: bool,
) -> Result<Vec<MediaFile>>
pub fn scan_directory( &self, root_path: &Path, recursive: bool, ) -> Result<Vec<MediaFile>>
Scans the given directory and returns all media files found.
§Arguments
path- The root directory to scan.recursive- Whether to scan subdirectories recursively.
Sourcepub fn scan_file_list(&self, file_paths: &[PathBuf]) -> Result<Vec<MediaFile>>
pub fn scan_file_list(&self, file_paths: &[PathBuf]) -> Result<Vec<MediaFile>>
Creates MediaFile objects from a list of file paths.
This method processes each file path individually, creating MediaFile objects with consistent IDs that match those generated by scan_directory.
§Arguments
file_paths- A slice of file paths to process
§Returns
A vector of MediaFile objects for valid media files, or an error if file access fails.
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