Parameters
- filePath: string
- onLine: (line: Buffer, lineNumber: number) => Promise<void>
- maxLines: number = Infinity
Returns Promise<boolean>
Whether all lines have been successfully read (false if maxLines was reached)
See readLineByLineSync for a synchronous version.
Reads a file line by line and calls the given function for each line. The
lineNumberstarts at0. ThemaxLinesoption limits the maximum number of read lines and isInfinityby default.