doc: update behaviour of fs.writeFile#25080
Conversation
|
Node.js Collaborators, please, add 👍 here if you approve fast-tracking. |
rvagg
left a comment
There was a problem hiding this comment.
pls make sure there's a Ref: https://github.com/nodejs/node/pull/23709 in the metadata too.
|
I don't think it should be fast-tracked. Its a critical, much debated, long discussed change, and documentation text should at least have the opportunity for people to comment on it. |
There was a problem hiding this comment.
I would suggest a string of ', World'. Or perhaps, the first string could be 'Dogs\n', and the second 'Cats\n'? The docs as written generate a misspelled phrase, which to me suggests its demonstrating a side-effect of some kind of misuse of the API, rather than a working-as-designed-and-useful capability.
There was a problem hiding this comment.
I included your suggestion, the , World. I didn't change it to Dogs and Cats because, readFile also uses Hello World as the example. Perhaps we can change them together in a separate PR. What do you think?
3177ae2 to
bb31222
Compare
As per the decision in nodejs#23433, the `fs.writeFile` will always write from the current position if it is used with file descriptors. This patch updates it. Ref: nodejs#23709
bb31222 to
55822cf
Compare
|
Landed in 309e772 |
As per the decision in #23433, the `fs.writeFile` will always write from the current position if it is used with file descriptors. This patch updates it. Ref: #23709 PR-URL: #25080 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
As per the decision in nodejs#23433, the `fs.writeFile` will always write from the current position if it is used with file descriptors. This patch updates it. Ref: nodejs#23709 PR-URL: nodejs#25080 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
As per the decision in #23433,
the
fs.writeFilewill always write from the current position if itis used with file descriptors. This patch updates it.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passescc @nodejs/fs @nodejs/tsc