Expand description
File discovery with glob patterns and layered ignore rules.
Walks a project tree and returns the files that should be part of the
context or index, honoring (in order): hidden-file rules, .gitignore
at all levels, .ignore, .contextignore, ctx’s built-in ignore list
(170+ patterns), and any custom include/ignore globs.
The main entry point is discover_files with a WalkerConfig;
FileFilter offers the same rules as a reusable per-file check
(used by watch mode).
Structs§
- File
Entry - Represents a discovered file with its metadata.
- File
Filter - File filter that can check if individual files should be included. This is built once and reused for watch mode filtering.
- Walker
Config - Configuration for the file walker.
Functions§
- discover_
files - Walk directories and discover files based on configuration.
- format_
size - Format file size in human-readable format.