Expand description
Directory scanning: walk a tree, pre-filter by glob and by content, then
parse matching files into Tasks.
This is the half of the old main.rs that has nothing to do with being a
command-line program. It takes ScanOptions rather than the parsed CLI
so embedders — notably an Android build, where no process can be spawned —
drive the same code path the binary does.
Structs§
- Scan
Options - Inputs to
scan_directory. The defaults match the CLI’s own defaults, so an embedder that only wants “scan this directory the way the tool does” writesScanOptions::default(). - Scan
Outcome - What a scan produced: the tasks themselves plus the diagnostics the CLI
prints as its per-run summary. Embedders can ignore
stats, but it is the only channel that reports skipped and failed files, so dropping it silently would hide a partial result.
Functions§
- scan_
directories - Scan several roots in one run and return the tasks of all of them.
- scan_
directory - Scan
dirand return the tasks found in it. - validate_
dir - Validate that a scan root points to an existing directory and canonicalize
it. Exposed because the binary validates
--dirbefore it opens the run span, so the error surfaces before any log line mentions the directory.