doc: clarify fd closing by fs.readFile
etc.
Ref: https://github.com/nodejs/node/issues/7560 PR-URL: https://github.com/nodejs/node/pull/7561 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
parent
359352c9e9
commit
beea23af65
@ -384,7 +384,8 @@ fs.appendFile('message.txt', 'data to append', 'utf8', callback);
|
||||
|
||||
Any specified file descriptor has to have been opened for appending.
|
||||
|
||||
_Note: Specified file descriptors will not be closed automatically._
|
||||
_Note: If a file descriptor is specified as the `file`, it will not be closed
|
||||
automatically._
|
||||
|
||||
## fs.appendFileSync(file, data[, options])
|
||||
<!-- YAML
|
||||
@ -1136,7 +1137,8 @@ fs.readFile('/etc/passwd', 'utf8', callback);
|
||||
|
||||
Any specified file descriptor has to support reading.
|
||||
|
||||
_Note: Specified file descriptors will not be closed automatically._
|
||||
_Note: If a file descriptor is specified as the `file`, it will not be closed
|
||||
automatically._
|
||||
|
||||
## fs.readFileSync(file[, options])
|
||||
<!-- YAML
|
||||
@ -1671,7 +1673,8 @@ Note that it is unsafe to use `fs.writeFile` multiple times on the same file
|
||||
without waiting for the callback. For this scenario,
|
||||
`fs.createWriteStream` is strongly recommended.
|
||||
|
||||
_Note: Specified file descriptors will not be closed automatically._
|
||||
_Note: If a file descriptor is specified as the `file`, it will not be closed
|
||||
automatically._
|
||||
|
||||
## fs.writeFileSync(file, data[, options])
|
||||
<!-- YAML
|
||||
|
Loading…
x
Reference in New Issue
Block a user