Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
fs: added fs.writev() which exposes syscalls writev() #25925
fs with writev allow many buffers to be pushed to underlying OS
I have tried to follow the old fs.write() function signature
I don't understand why if a single buffer object is passed, it would be split up in chunks just to use
I don't see a reason to restrict it like that. Any data type supported by the language or node.js that stores binary data should be allowed IMO.
On another note, I think if we are going to support strings, I think it might be better to support them on the C++ side like we do for socket writev to avoid having to possibly cross the JS/C++ boundary for each string. One thing that you might want to benchmark though with that C++ implementation is whether it'd be faster to do the