feat(restore): implement file restore feature content deduplication and compression #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant changes to the core functionality of the project, particularly focusing on content storage, restoration, and file state management. The most important changes include adding a new
ContentStorestruct for handling file storage and retrieval, implementing restoration logic, and enhancing theFileStatestruct with additional traits.Content Storage and Management:
ContentStorestruct insrc/core/content.rsto handle file storage, retrieval, compression, and verification. This includes methods likestore_file,retrieve_file,cleanup, andverify_content.src/core/snapshot.rsto integrateContentStorefor managing file states and storing file hashes. [1] [2] [3]Restoration Functionality:
src/core/restore.rsto handle restoration processes, including functions likeperform_restore,has_uncommitted_changes,has_available_space,validate_permissions, andgenerate_restore_report.RestoreReportstruct insrc/core/models.rsto encapsulate details about added, modified, deleted, and unchanged files during restoration.Enhancements to Models:
FileStatestruct insrc/core/models.rsby addingCloneandPartialEqtraits to support comparison and cloning.Dependency Updates:
sysinfoandzstdinCargo.tomlto support system information retrieval and compression functionalities.Module Integration:
src/core/mod.rsto include new modulesrestoreandcontent.