Skip to main content

copy_file

Function copy_file 

Source
pub fn copy_file(ctx: &mut HostContext, src: &Path, dest: &Path) -> Result<()>
Expand description

Copy a single file from src to dest, creating the dest parent as needed.

In dry-run mode, records a planned cp and returns.

ยงErrors

Returns HortoError::Message when the copy fails in apply mode (includes paths).