Read file content with line numbers.
Uses pure POSIX shell (awk) via execute() — only the requested slice is returned over the wire, making this efficient for large files. Works on any Linux including Alpine (no Python or Node.js needed).
read(filePath: string, offset: number = 0, limit: number = 500): Promise<string>| Name | Type | Description |
|---|---|---|
filePath* | string | Absolute file path |
offset | number | Default: 0Line offset to start reading from (0-indexed) |
limit | number | Default: 500Maximum number of lines to read |