# LargeFileIndexer

**Kind:** Class

**Source:** [`atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/large-file-indexer.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/large-file-indexer.ts#L44)

Large File Indexer - Creates indexes for files >500KB

## Methods

| Method | Signature | Returns |
|---|---|---|
| `isLargeFile` | `isLargeFile(filePath: string)` | `Promise<boolean>` |
| `createIndex` | `createIndex(filePath: string)` | `Promise<LargeFileIndex>` |

## Where it refuses work

- `LargeFileIndexer` stops the work with an early return when `firstLines.includes(marker)`.
- `LargeFileIndexer` stops the work with an early return when `pattern.test(fileName)`.
- `LargeFileIndexer` stops the work with an early return when `filePath.includes(dirPattern)`.
- `LargeFileIndexer` stops the work with an early return when `pattern.test(code)`.
- `LargeFileIndexer` stops the work with an early return when `foundOpen && braceCount === 0`.
- `LargeFileIndexer` stops the work with an early return when `match`.

## When something fails

- `LargeFileIndexer` handles failure in 1 place: it turns it into a return value in all 1.
