pub fn scan(directory: PathBuf, recursive: bool, config: models::Config) -> Result<(), Box <dyn Error>> {
    let files = find_files(directory, recursive)?;
    catalogue_database::create_table(&config)?;
    catalogue_database::insert_files(&config, files);
    Ok(())
}
// Scan the directory, get the list of files and put into the database
Scan the directory, get the list of files and put into the database
Scan the directory get the list of files and put into the database
pub fn scan(directory: PathBuf, recursive: bool, config: models::Config) -> Result<(), Box <dyn Error>> {
    let files = find_files(directory, recursive)?;
    catalogue_database::create_table(&config)?;
    catalogue_database::insert_files(&config, files);
    Ok(())
}
pub fn scan ( directory : PathBuf , recursive : bool , config : models :: Config ) -> Result < ( ) , Box < dyn Error > > { let files = find_files ( directory , recursive ) ? ; catalogue_database :: create_table ( & config ) ? ; catalogue_database :: insert_files ( & config , files ) ; Ok ( ( ) ) }
Scan the directory, get the list of files and put into the database
Scan the directory get the list of files and put into the database
directory
PathBuf
recursive
bool
config
models::Config
directory
PathBuf
recursive
bool
config
models::Config