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 and louwers committed Nov 2, 2024
1 parent a35ebac commit a306503
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 a306503

Please sign in to comment.