- readLineByLine(filePath, onLine): Promise<void>
Parameters
- filePath: string
- onLine: ((line: Buffer, lineNumber: number) => Promise<void>)
- (line, lineNumber): Promise<void>
Parameters
- line: Buffer
- lineNumber: number
Returns Promise<void>
Returns Promise<void>
Reads a file line by line and calls the given function for each line. The
lineNumber
starts at0
.See readLineByLineSync for a synchronous version.