pub fn copy_directory<F>(
source: &Path,
target: &Path,
on_progress: F,
) -> Result<CopyResult, CopyError>Expand description
Copy a directory with parallel enumeration and copying.
Only copies if target directory doesn’t exist.
§Arguments
source- Source directory pathtarget- Target directory pathon_progress- Callback for progress updates (called periodically, not for every file)
§Errors
- If enumeration fails
- If any file copy fails (fail-fast behavior)