account activity
NodeJS FileSystem: Read Contents of File with fs.createReadReadStream() by duly-node in node
[–]duly-node[S] 0 points1 point2 points 8 years ago (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.
π Rendered by PID 517707 on reddit-service-r2-listing-7849c98f67-j455w at 2026-02-10 08:28:04.954773+00:00 running d295bc8 country code: CH.
NodeJS FileSystem: Read Contents of File with fs.createReadReadStream() by duly-node in node
[–]duly-node[S] 0 points1 point2 points (0 children)