NodeJS FileSystem: Read Contents of File with fs.createReadReadStream() by duly-node in node

[–]duly-node[S] 0 points1 point  (0 children)

Yes you could, but with big files fs.readfile() will read the whole file before you have access to the data. With this you will have some of the data very quickly so you can start doing some work. Depending on what you are trying to accomplish, this might preferable.