tristanfaure.com /projects / file-explorer
File Explorer (Rust + GTK)
A desktop file manager written from scratch in Rust, with its own index and search
Stack
- Rust
- GTK 3
- GIO / GLib
- zip
- FFmpeg
- Cargo
Key figures
- Language
- Rust, 1,422 lines
- Search
- Hand-written binary search
- Defenses
- 12.92 to 14.73
- UI
- Native GTK TreeView
EPITA second-year programming project: a working desktop file manager, built in Rust with a native GTK interface rather than a web view. Browse, open, rename, copy, delete, create folders, toggle hidden files, with file type, size and last-modified rendered in a TreeView.
The interesting part is underneath the window. The filesystem is walked recursively into a sorted index of (name, path) pairs, and searching it is a binary search written by hand rather than a call to a library: the comparison is adapted so a prefix match counts as a hit, which a plain ordering comparison would miss.
Archiving is implemented rather than shelled out: folders are walked and written into a zip archive entry by entry, directories included. Video compression is the one place that delegates, invoking FFmpeg as a subprocess.
Rust was the point as much as the file manager. Ownership and borrowing are what make a recursive walk, a GTK callback closure and a shared index coexist without a garbage collector, and the compiler is unforgiving about it.
Graded across three defenses with the mark rising each time: 12.92, then 14.10, then 14.73.
Links
- Source is private: access on request, via the contact details.
All 34 projects · Open the interactive portfolio · About Tristan