A Rust file-synchronization tool currently focused on analyzing the differences between a source directory and a destination directory.
The project is an early work in progress. It currently:
- walks source and destination directory trees;
- records file metadata and modification times;
- calculates SHA3-256 hashes for files, including each file name in the hash;
- detects files that should be added, modified, or deleted.
The detected actions are not applied yet: running the program does not copy, modify, or delete files.
- Rust with Cargo
Run the analyzer with a source and destination directory:
cargo run -- -s <source_directory> -d <destination_directory>For example, using the included test fixtures:
cargo run -- -s ./test_env/test_source -d ./test_env/test_destThe program expects exactly four arguments after the executable: -s, the
source directory, -d, and the destination directory. Both paths must point
to existing directories.
Run the test suite with:
cargo testBuild the project with:
cargo buildsrc/
├── main.rs # Command-line entry point
└── rsync/
├── analyze.rs # Directory scanning and difference detection
├── crypto.rs # SHA3-256 file hashing
├── filesystem.rs # File, folder, and content-tree models
└── sync.rs # Synchronization workflow
test_env/ # Example source and destination trees
- apply detected add, modify, and delete actions;
- provide a clearer action summary and error handling;
- add command-line argument validation and synchronization options;
- expand filesystem and integration test coverage.
See LICENSE.