Function copy_one

Source
pub fn copy_one(
    source: &Path,
    destination: &Path,
    expected_size: u64,
    verify: bool,
    replace: bool,
) -> Result<Wrote, String>
Expand description

Copies one file through isolated temporary output.

verify flushes and compares newly copied bytes using constant memory. Read-back may still come from the operating-system cache; it does not prove durable media contents. Existing same-size files are a resume heuristic and remain unchecked by this wrapper. Use copy_one_checked to check them. Call validate_destination first when the destination belongs to a plan.