Struct dir_signature::ScannerConfig
[−]
[src]
pub struct ScannerConfig { /* fields omitted */ }
Scanner config contains a list of directories you will scan and other settings that influence filesystem scanning
Methods
impl ScannerConfig
[src]
fn new() -> ScannerConfig
Create an empty scanner config with defaults
By default we use sha512/256
hasher as it increases
interoperability, but consider using blake2b/256
as it 25% faster
fn hash(&mut self, hash: HashType) -> &mut Self
Use different hash type
fn threads(&mut self, num: usize) -> &mut Self
Set number of threads to use for scanning
Default is 1 which means don't create additional threads run scanning in current one
fn queue_size(&mut self, num: usize) -> &mut Self
Set number of index entries that can be queued in the background
It only makes sense if threads > 0 and you may need to tweak it only in very memory constraint situations
Default is some value proportional to the number of threads.
fn add_dir<P, R>(&mut self, path: P, prefix: R) -> &mut Self where
P: AsRef<Path>,
R: AsRef<Path>,
P: AsRef<Path>,
R: AsRef<Path>,
Add a directory to the index
prefix
should either be /
or a subdirectory where indexed files
will be placed
fn print_progress(&mut self) -> &mut Self
Enable printing progress to stderr