Optional
options: { Optional
slice?: { Optional
end?: numberOptional
start?: numberimport { filesystem } from "@rjweb/utils"
for await (const chunk of filesystem.stream('./file.txt')) {
process.stdout.write(chunk.toString())
}
for await (const line of filesystem.stream('./file.txt').lines()) {
console.log('Line: ', line)
}
1.9.0
nodejs
Stream a File Chunk by Chunk (or Line by Line)