Skip to content

Commit beea23a

Browse files
kibertoadaddaleax
authored andcommitted
doc: clarify fd closing by fs.readFile etc.
Ref: #7560 PR-URL: #7561 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 359352c commit beea23a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

doc/api/fs.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,8 @@ fs.appendFile('message.txt', 'data to append', 'utf8', callback);
384384

385385
Any specified file descriptor has to have been opened for appending.
386386

387-
_Note: Specified file descriptors will not be closed automatically._
387+
_Note: If a file descriptor is specified as the `file`, it will not be closed
388+
automatically._
388389

389390
## fs.appendFileSync(file, data[, options])
390391
<!-- YAML
@@ -1136,7 +1137,8 @@ fs.readFile('/etc/passwd', 'utf8', callback);
11361137

11371138
Any specified file descriptor has to support reading.
11381139

1139-
_Note: Specified file descriptors will not be closed automatically._
1140+
_Note: If a file descriptor is specified as the `file`, it will not be closed
1141+
automatically._
11401142

11411143
## fs.readFileSync(file[, options])
11421144
<!-- YAML
@@ -1671,7 +1673,8 @@ Note that it is unsafe to use `fs.writeFile` multiple times on the same file
16711673
without waiting for the callback. For this scenario,
16721674
`fs.createWriteStream` is strongly recommended.
16731675

1674-
_Note: Specified file descriptors will not be closed automatically._
1676+
_Note: If a file descriptor is specified as the `file`, it will not be closed
1677+
automatically._
16751678

16761679
## fs.writeFileSync(file, data[, options])
16771680
<!-- YAML

0 commit comments

Comments
 (0)