pub(crate) fn dedupe_folder(
channel_dir: &Path,
rotate_secs: u64,
dry_run: bool,
) -> Result<Outcome>Expand description
Deduplicates one channel folder.
See the module documentation for the steps. The original folder is only replaced after the staged copy has passed both checks; on any error the staging folder is deleted and the original is left as it was.
§Arguments
channel_dir- Thech<NN>folder to process.rotate_secs- Window length in seconds.dry_run- Whentrue, build and verify the new folder, then delete it.
§Errors
Returns an error if a file cannot be read or written, a check fails, or the swap fails.