4 ms·
I probably don't understand what I'm looking at. I would like sendFile/sendFileSync - which would abstract over TransferFile on Windows.
by blitmap 9y ago
I probably don't understand what I'm looking at. I would like sendFile/sendFileSync - which would abstract over TransferFile on Windows.
- avaer 9y agoThe reason you're unlikely to see that in the node binary is presumably the same reason copyFile has taken so long: node aims to have a small core that enables a rich userspace. There's gotta be a very good reason to bog down the core with more stuff, since that equals less other stuff and more bugs. Some of the few valid reasons are ubiquity (which HTTP is, but Windows and sending files are not), or things that were impossible before (like no overhead file copy).
- coldtea 9y ago>node aims to have a small core that enables a rich userspace So, dogma? Because copying a file fits right in any kind of "small core" -- and helps create a more dependable and usable "rich userspace" which doesn't need to reinvent the wheel 200 times for basic stuff.