You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Although just barely (see #7707), the fd option to fs.createReadStream is publicly documented. However for fs.createWriteStream no mention is made, although I see in the code it is supported.
Is this feature supposed to be publicly used only with readStream, or encouraged with both, or publicly supported with neither?
The text was updated successfully, but these errors were encountered:
FWIW, it looks like the following interesting facts are true about passing an fd to fs.createWriteStream:
the 'open' event is not fired if you pass in a file descriptor
once 'finish' fires, fd will be closed, i.e. there is no support for an 'autoClose:false' option like fs.createReadStream
…TBD…
DISCLAIMER — please don't take the above "documentation" as an official API commitment, I am just some yokel nosing around in someone's else's code to see how it might currently behave.
Clarify the fd option: it is preferred to the path parameter, omits
the "open" event if given, and is available on WriteStreams as well.
PR-URL: #7707Fixes: #7707Fixes: #7708Fixes: #4367
Reviewed-By: Chris Dickinson <[email protected]>
Although just barely (see #7707), the
fd
option tofs.createReadStream
is publicly documented. However forfs.createWriteStream
no mention is made, although I see in the code it is supported.Is this feature supposed to be publicly used only with readStream, or encouraged with both, or publicly supported with neither?
The text was updated successfully, but these errors were encountered: