pub fn copy_dir_all(src: &Path, dst: &Path) -> Result<()>Expand description
Recursively copies a directory whilst maintaining structure and attributes.
Performs a deep copy of a directory tree, preserving file attributes and handling nested directories. Uses parallel processing for improved performance.
§Arguments
src- Source directory pathdst- Destination directory path
§Returns
Ok(())- If the copy operation succeedsErr- If any part of the copy operation fails
§Performance
Uses rayon for parallel processing of files, significantly improving performance for directories with many files.
§Safety
- Verifies file safety before copying
- Maintains original file permissions
- Handles circular references