pub(crate) fn fill_list(
path: &Path,
regex: &Regex,
exclude_regex: Option<&Regex>,
expr_root: Option<&ExprNode>,
opts: &Options,
stats: &mut Stats,
files: &mut Vec<String>,
depth: i32,
)Expand description
Recursively walk a directory and collect all matching file paths into files.
This is the list-all counterpart to add_directory(). Instead of executing
a command for each match, it appends the full path of every matched entry to
the files vector. The caller then joins these paths and invokes the command
template once via proc_cmd() with %0 expanded to the entire list.
§Arguments
path— the directory to scanregex— compiled regex matched against each entry’s full pathexclude_regex— optional compiled exclude patternexpr_root— optional parsed expression tree (from--expr)opts— runtime options (depth, hidden, filters, etc.)stats— mutable execution statistics (files_matched is incremented)files— accumulator for matched file pathsdepth— current recursion depth (0 at the root call)