Expand description
File operations engine for gravityfile.
This crate provides async file operations (copy, move, rename, create, delete) with progress reporting via channels, following the same pattern as the existing deletion implementation.
Re-exports§
pub use archive::ArchiveError;pub use archive::ArchiveFormat;pub use archive::ArchiveResult;pub use archive::create_archive;pub use archive::extract_archive;
Modules§
- archive
- Archive operations (extract and compress).
Structs§
- Cancellation
Token - A token which can be used to signal a cancellation request to one or more tasks.
- Conflict
- A conflict detected during a file operation.
- Copy
Options - Options for copy operations.
- Move
Complete - Completion result for move operations, including the moved pairs needed by the undo system.
- Move
Options - Options for move operations.
- Operation
Complete - Result of a completed operation.
- Operation
Error - An error that occurred during a file operation.
- Operation
Executor - Executor for file operations with unified interface.
- Operation
Progress - Progress information for an ongoing operation.
- Undo
Entry - An entry in the undo log.
- UndoLog
- Undo log with configurable maximum depth.
Enums§
- Conflict
Kind - The kind of conflict encountered.
- Conflict
Resolution - How to resolve a conflict.
- Copy
Result - Result sent through the channel during copy operations.
- Create
Result - Result sent through the channel during create operations.
- File
Operation - A file operation to be executed.
- Move
Result - Result sent through the channel during move operations.
- Operation
Result - Unified result type for all operations.
- Operation
Type - The type of operation being performed.
- Rename
Result - Result sent through the channel during rename operations.
- Undoable
Operation - An operation that can be undone.
Constants§
- OPERATION_
CHANNEL_ SIZE - Default channel buffer size for operation progress updates.
Functions§
- execute_
undo - Execute an undo operation.
- start_
copy - Start an async copy operation.
- start_
create_ directory - Start an async directory creation operation.
- start_
create_ file - Start an async file creation operation.
- start_
move - Start an async move operation.
- start_
rename - Start an async rename operation.