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: nodejs#54626
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
  • Loading branch information
robberfree authored Nov 2, 2024
1 parent df4a0c9 commit 7f6ea83
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 7f6ea83

Please sign in to comment.