Skip to content

Commit

Permalink
doc: add write flag when open file as the demo code's intention
Browse files Browse the repository at this point in the history
PR-URL: #54626
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
  • Loading branch information
robberfree authored and aduh95 committed Nov 6, 2024
1 parent c2fcda4 commit b8ca9d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -3731,7 +3731,7 @@ class WriteStream extends Writable {
this.fd = null;
}
_construct(callback) {
fs.open(this.filename, (err, fd) => {
fs.open(this.filename, 'w', (err, fd) => {
if (err) {
callback(err);
} else {
Expand Down

0 comments on commit b8ca9d8

Please sign in to comment.