njs-examples icon indicating copy to clipboard operation
njs-examples copied to clipboard

Examples of fs.readSync Use

Open lancedockins opened this issue 2 years ago • 0 comments

Are there any good examples of fs.readSync? I already know how to use readFileSync but need to support an alternate use case that reads larger text files (strings) either line by line or blocks of bytes at a time. I've tried a few different implementations of fs.readSync so far but so far it seems like those implementations aren't working. They aren't throwing errors. They're just reading zero bytes at a time. So I was hoping that there were some good code examples that could show how to use that properly.

lancedockins avatar Sep 20 '23 21:09 lancedockins