Expand description
minifind is a minimal, parallel find(1) reimplementation.
The crate is split into a thin binary (main.rs) and this library so the
traversal pipeline can be driven through a public API and exercised by
integration tests. run spawns a dedicated output thread, walks every
requested path in parallel via walk::walk_parallel, filters entries by
file type / glob / regex, and writes matched paths to a caller-supplied sink.
§Examples
use minifind::args::Args;
use std::io;
let args = Args::default();
minifind::run(&args, || io::stdout().lock()).unwrap();Modules§
- args
- filetype
- glob
- interrupt
- meta
- Metadata predicates — the find-style filters that require a
stat:-size,-mtime/-ctime/-atime(+-mmin/-cmin/-amin),-perm,-uid/-gid, and-user/-group. - ratelimit
- Global I/O rate limiter for the walker, wrapping
governor. - regex
- sched
--idlescheduling (Linux): SCHED_IDLE + IOPRIO_CLASS_IDLE for the walker pool (per worker) plus nice +19 process-wide, so a heavy walk yields the CPU and disk to other work.- walk
- Custom parallel filesystem walker: a
crossbeam-dequework-stealing engine over acfg-split leaf (unix/fallback).
Functions§
- raise_
nofile_ limit - Raises the soft
RLIMIT_NOFILEto the hard limit, giving the walker headroom for its pinned-parent-fd frontier (≈ O(workers × depth)), asfind/fddo. Best-effort; returns the resulting soft limit (None= unlimited). - run
- Runs the pipeline: parallel walk → filter by type/glob/regex → write matched paths.