Expand description
Core logic for ddupe.
This module contains pure functionality for:
- hashing files
- collecting files from a directory tree
- analysing duplicates and computing potential space savings
The CLI, progress bars, colouring and user interaction live in src/main.rs.
Structs§
- Duplicate
Analysis - Full analysis result of a scan.
- Duplicate
Group - A single duplicate group: one “keep” file and zero or more “dupe” files.
Functions§
- analyse_
duplicates - Given a mapping from content-hash -> list of files, build a
DuplicateAnalysis. - build_
hash_ map - Build a hash map: SHA-256 hash -> list of files with that hash.
- collect_
files - Collect all files under a root directory (recursively).
- format_
bytes - Human-readable byte formatting (KB, MB, GB).
- hash_
file - Hash a single file using SHA-256 and return the hex-encoded digest.