Skip to content

Commit 8bd5777

Browse files
robberfreeruyadorno
authored andcommitted
doc: add write flag when open file as the demo code's intention
PR-URL: #54626 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
1 parent 37bafce commit 8bd5777

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/stream.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3721,7 +3721,7 @@ class WriteStream extends Writable {
37213721
this.fd = null;
37223722
}
37233723
_construct(callback) {
3724-
fs.open(this.filename, (err, fd) => {
3724+
fs.open(this.filename, 'w', (err, fd) => {
37253725
if (err) {
37263726
callback(err);
37273727
} else {

0 commit comments

Comments
 (0)