-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Purpose of fs ReadStream.open #29050
Comments
The reason is lost in the mist of time. It was introduced in the exquisitely well documented commit 44b308b from 2012. I had some pretty strong misgivings about streams2 back then, among them that it had a lot of loose ends, and this was one of them. Isaac basically merged it without consulting anyone. |
Is it something we can deprecate? Remove from documentation? |
I don't think it's documented. Removal would need to start with run-time deprecation, i.e, printing a deprecation notice on first use. |
Multiple PR's related to this. |
Allow overriding open, write, and close when using createReadStream() and createWriteStream(). PR-URL: nodejs#29083 Refs: nodejs#29050 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
I'm not quite sure I understand the purpose of
ReadStream.open
infs
? Why would I use this?Opening the stream after closing it doesn't quite make sense and if passing an existing fd then it should already be opened.
The text was updated successfully, but these errors were encountered: