$ show qarmin/czkawka
Czkawka is a multi-tool file cleanup utility written in Rust that finds and removes duplicate files, similar images/videos/music, empty directories, broken files, temporary files, and more. It is structured as a Rust workspace with a shared core library (`czkawka_core`) that implements all scanning algorithms and a common architecture (traits, caching, progress reporting). Three frontends exist: a CLI (`czkawka_cli`), a legacy GTK4 desktop GUI (`czkawka_gui`, in maintenance mode), and a modern Slint-based desktop GUI (`krokiet`) which is the primary focus. An additional Slint-based Android app (`cedinia`) also reuses the core. The codebase demonstrates strong software engineering practices: modular design, extensive use of traits, parallel directory traversal with a builder pattern, generic caching, and comprehensive localization via Fluent. Despite some duplication between frontends and the deprecated GTK GUI, the core library is well-crafted and reusable.
The LLM identified 3 files worth highlighting for reuse:
A generic, configurable directory walker using a fluent builder pattern. It supports filtering (by excluded items, extensions, size limits), grouping (e.g., by inode), parallel iteration via rayon, stop-flag cancellation, and progress reporting over a channel. This component is self-contained within `czkawka_core` and can be extracted for any Rust project that needs to traverse large file trees with advanced filtering and concurrency.
Generic cache load/save/clean infrastructure parameterized over any serializable type implementing `ResultEntry`. Uses `bincode` for fast binary serialization with JSON fallback, automatic cache versioning via constants, and periodic cleaning of stale entries. This pattern is used by every tool in the project and can be reused in any application that needs persistent, versioned, and self-cleaning caches.
A wrapper around `crossbeam_channel::Sender` that throttles messages to a receiver, ensuring updates are sent at most once per configurable interval. It accumulates pending messages and flushes on drop. This is a small, self-contained utility that can be extracted to reduce UI update frequency in any Rust application with high-throughput progress reporting.