pub fn parse_directory(
root: &Path,
args: &[String],
parallel: bool,
max_depth: Option<usize>,
allow_system: bool,
) -> Result<Vec<(String, Vec<RawNode>)>, IcbError>Expand description
Recursively discover C/C++ files under root and parse each one.
Only files with an extension in {c, cpp, cc, cxx, h, hpp} are
processed. Symlinks are ignored to prevent infinite recursion.
§Arguments
root– Root directory for the walk.args– Clang command‑line arguments shared by all files.parallel– Distribute work across threads iftrue.max_depth– Maximum directory depth (Nonefor unlimited).allow_system– Forwarded toparse_cpp_file.
§Errors
Returns IcbError::Io if the directory walk fails, or
IcbError::Parse for the first file that fails.