Skip to content

Commit 1bb461e

Browse files
robberfreemarco-ippolito
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 9c2d0fd commit 1bb461e

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
@@ -3715,7 +3715,7 @@ class WriteStream extends Writable {
37153715
this.fd = null;
37163716
}
37173717
_construct(callback) {
3718-
fs.open(this.filename, (err, fd) => {
3718+
fs.open(this.filename, 'w', (err, fd) => {
37193719
if (err) {
37203720
callback(err);
37213721
} else {

0 commit comments

Comments
 (0)