Question
Walk a directory tree and return groups of files whose complete byte contents are identical. ```python def find_duplicate_files(root: str) -> list[list[str]]: ... ``` Each returned path must be absolute and resolved. Omit groups containing only one file. Group and path order are not significant. ## Requirements - Skip symbolic links and continue past files that become unreadable. - Treat multiple empty files as duplicates. - Avoid reading every byte of every file when cheap evidence can rule out equality. - A full-content comparison or collision-resistant digest must confirm every reported group. - Stream large files in bounded-size blocks rather than loading them entirely into memory. Assume files may change during a scan; state whether you detect, retry, or report that race. ## Staged follow-ups 1. Bucket by file size, then by a small prefix, then by a full digest. 2. Reduce unnecessary I/O when many huge files share a size and prefix. 3. Parallelize the scan and justify the worker model from measured bottlenecks. 4. Extend the design across machines and identify straggler and merge problems. 5. Support continuous detection as files are created and modified.