Skip to main content

run_script

Function run_script 

Source
pub fn run_script<I>(
    script: I,
    should_lock: bool,
    log: &dyn Log,
) -> DedupeResult
where I: IntoParallelIterator<Item = (usize, Vec<FsCommand>)>,
Expand description

Runs a deduplication script generated by dedupe.

Calling this function is going to change the contents of the file-system. No safety checks are performed. Commands are executed in parallel, on the default Rayon thread-pool. On command execution failure, a warning is logged and the execution of remaining commands continues. Returns the number of files processed and the amount of disk space reclaimed.