Skip to main content

copy_file_verified

Function copy_file_verified 

Source
pub fn copy_file_verified(
    src: &Path,
    dst: &Path,
    expected_size: u64,
    expected_hash: &str,
) -> Result<(u64, String)>
Expand description

Copy + verify a recorded size/hash. On mismatch the new destination is removed and the operation fails (never installs unverified bytes).