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 ruyadorno committed Nov 27, 2024
1 parent a840103 commit 0c26ac7
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 @@ -3721,7 +3721,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 0c26ac7

Please sign in to comment.