Memo::Files
File indexing support for memo CLI
Provides directory walking with ignore file support, binary file detection, and file metadata tracking for incremental updates.
Instance methods
Fallback binary detection by checking for null bytes
Collect all text files in directory
Get file record by content hash
Get file record by source_id
List all indexed files
Check if file needs re-indexing (mtime changed)
Walk directory and yield text files, respecting ignore patterns
Uses ignoreme for .gitignore-style filtering. Uses magic.cr to detect and skip binary files.
Options:
- root: Directory to walk
- ignore_file: Ignore file name (default ".gitignore")