Skip to main content

overwrite_file

Function overwrite_file 

Source
pub fn overwrite_file<F>(
    source: &Path,
    target: &Path,
    on_progress: F,
) -> Result<CopyResult, CopyError>
where F: Fn(&CopyProgress),
Expand description

Copy a single file, overwriting if it exists.

§Arguments

  • source - Source file path
  • target - Target file path
  • on_progress - Callback for progress updates

§Errors

  • If the copy operation fails