Repository navigation
fs: expose scatter/gather syscalls writev() and readv() #2298
Description
Activity
- addedfsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.discussIssues opened for discussion and feedback.Issues opened for discussion and feedback.
on Aug 4, 2015 @reqshark Can you elaborate a little on this? Or maybe link to the specific comment in the PR that you're referring to? Apologies in advance for my ignorance.
@Trott oh ok, I remember now what this was about.
i was just thinking how cool would it be to do
fs.writevandfs.readv?API would operate by using
fs.openfirst to get anfdand use it like we do onfs.read/fs.writethis would open the door to more efficient I/O for a wide variety of buffer sizes
- addedfeature requestIssues requesting new Node.js features.Issues requesting new Node.js features.
on Jun 6, 2016 #2167 landed. Anyone thinking this feature is a good idea and willing to try to implement and submit a pull request?
- removeddiscussIssues opened for discussion and feedback.Issues opened for discussion and feedback.
on Mar 9, 2018 - changed the title
[-]fs: expose scatter/gather syscalls writev() and readv()[/-][+]fs: expose setter/getter syscalls writev() and readv()[/+]on Nov 11, 2018 Put into https://github.com/nodejs/node/projects/13 backlog
@refack did you intentionally change the title from "scatter/gather" to "setter/getter"?
writev/readvare correctly called "scatter/gather" syscalls.nice catch @zbjornson!
- changed the title
[-]fs: expose setter/getter syscalls writev() and readv()[/-][+]fs: expose scatter/gather syscalls writev() and readv()[/+]on Jan 26, 2019 Fwiw,
writevis already available on the internalfsbinding (aswriteBuffers), so that should be very easy to implement.readvshouldn’t be much harder.I’d like to reopen this. It’s not a trivial first contribution, but if you know some C++ and can copy-paste the rest together, this should be doable (and I’m happy to help), so I’m adding
good first contribution.Reacted by Zach Bjornson, Bent Cardan, Anas Aboreeda (fka. Aboureada), Juan José, JenilChristo and Linz3 remaining items
@addaleax Is this still available, If yes I would like to pick it up and work on it as my first contribution, and definitely I will need your guidance.
@anasfullstack Awesome! I think your best point to start would be to look at how
fs.write()for single Buffers is implemented, and try to come up with something similar that callsbinding.writeBuffersrather thanbinding.writeBuffer?Reacted by Anas Aboreeda (fka. Aboureada) and Juan Joséhas this issue gone
Stale?For anyone interested, all the issues in https://github.com/nodejs/node/projects/13 are looking for someone to "adopt" them. In general they represent ideas that did not raise objections, but have no champion to push them forward.
Reacted by Thang Tran, Linz, Pranshu Srivastava, Juan José and Yogev B.- added 2 commits that reference this issue
on Mar 30, 2020 - added 2 commits that reference this issue
on Apr 25, 2020 - added a commit that references this issue
on May 5, 2024 - added a commit that references this issue
on Jul 27, 2026
with the awesome work achieved here by @ronkorving in libuv/libuv@2bf7827
the upcoming libuv release will unblock #2167
first mentioned by @trevnorris in that PR, i think it makes a lot of sense to expose scatter/gather syscalls
writevand alsoreadvfrom node.js