Crate ddupe

Crate ddupe 

Source
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§

DuplicateAnalysis
Full analysis result of a scan.
DuplicateGroup
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.