mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2025-12-11 20:15:30 +01:00
1.2 KiB
1.2 KiB
id, title, status, assignee, parent, priority, tags, whitepaper
| id | title | status | assignee | parent | priority | tags | whitepaper | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FILE-001 | File Copy Job with Strategy Pattern | Done | james | FILE-000 | High |
|
Section 4.4.6 |
Description
A flexible FileCopyJob will be implemented to handle all copy and move operations. It uses a strategy pattern to select the optimal file transfer method (e.g., local move, cross-volume stream, remote transfer) based on the source and destination SdPath.
Implementation Notes
- The
FileCopyJobandCopyOptionswill be defined insrc/operations/files/copy/job.rs. - The
CopyStrategyRouterinsrc/operations/files/copy/routing.rsselects the appropriate strategy. - Implement strategies include
LocalMoveStrategy,LocalStreamCopyStrategy, andRemoteTransferStrategyinsrc/operations/files/copy/strategy.rs. - The job provides detailed, byte-level progress updates.
Acceptance Criteria
- The job can copy files and directories locally.
- The job correctly selects an atomic
renamefor same-volume moves. - The job can orchestrate a cross-device transfer between two peers.
- The job correctly handles
delete_after_copyfor move operations.