Skip to content

Commit b8ca9d8

Browse files
robberfreeaduh95
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 c2fcda4 commit b8ca9d8

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
@@ -3731,7 +3731,7 @@ class WriteStream extends Writable {
37313731
this.fd = null;
37323732
}
37333733
_construct(callback) {
3734-
fs.open(this.filename, (err, fd) => {
3734+
fs.open(this.filename, 'w', (err, fd) => {
37353735
if (err) {
37363736
callback(err);
37373737
} else {

0 commit comments

Comments
 (0)