Expand description
Fast parallel file copying with progress tracking.
This crate provides efficient file and directory copying operations with:
- Parallel directory enumeration using
jwalk - Parallel file copying using
rayon - Copy-on-write support via
reflink-copy(APFS, Btrfs,ReFS) - Progress callbacks for UI integration
- Fast file counting
§Example
ⓘ
use worktree_setup_copy::{copy_directory, CopyProgress, count_files};
// Count files first for progress bar
let total = count_files(source);
copy_directory(source, target, |progress: &CopyProgress| {
println!("{}/{} files copied", progress.files_copied, progress.files_total);
})?;Structs§
- Copy
Progress - Progress information for a copy operation.
- Progress
Tracker - Thread-safe progress tracker using atomics.
Enums§
- Copy
Error - Errors that can occur during copy operations.
- Copy
Result - Result of a copy operation.
Functions§
- copy_
directory - Copy a directory with parallel enumeration and copying.
- copy_
file - Copy a single file with progress callback.
- count_
files - Count files in a path.
- count_
files_ with_ progress - Count files in a directory with progress callback.
- overwrite_
file - Copy a single file, overwriting if it exists.