class

Xerp::Index::FileScanner

Inherits Reference < Object

Scans a directory for files to index.

Constants

DEFAULT_IGNORE_DIRS = Set {".git", ".cache", ".local", ".hg", ".svn", "node_modules", "vendor", "deps", "lib", "target", "build", "dist", "out", "_build", "__pycache__", ".pytest_cache", ".mypy_cache", ".idea", ".vscode", ".vs", ".claude", "coverage", ".nyc_output", "tmp", "temp", "cache"}

Default directories to ignore.

DEFAULT_IGNORE_PATTERNS = [/\.min\.js$/, /\.min\.css$/, /\.map$/, /\.lock$/, /package-lock\.json$/, /yarn\.lock$/, /Gemfile\.lock$/, /\.DS_Store$/, /Thumbs\.db$/, /^\.env$/, /^\.env\..+$/]

File patterns to ignore.

Constructors

new(root : String, ignore_dirs : Set(String) | Nil = nil, ignore_patterns : Array(Regex) | Nil = nil)
Source

Instance methods

scan

Scans all files in the root directory.

Source
scan_all

Scans all files and returns them as an array.

Source
scan_file(rel_path : String) : ScannedFile | Nil

Scans a specific file by relative path.

Source