Skip to main content

get_code_structure

Function get_code_structure 

Source
pub fn get_code_structure(
    root: &Path,
    language: Language,
    max_results: usize,
    ignore_spec: Option<&IgnoreSpec>,
) -> TldrResult<CodeStructure>
Expand description

Extract code structure from all files in a directory.

§Arguments

  • root - Root directory to scan
  • language - Programming language to extract
  • max_results - Maximum number of files (0 = unlimited)
  • ignore_spec - Optional ignore patterns

§Edge Cases (per spec)

  • Syntax error in file: Skip file, continue with others
  • Binary file: Skip silently
  • Encoding error: UTF-8 lossy fallback
  • Empty file: Include with empty lists