Browse Source

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>
v7.x
kibertoad 9 years ago
committed by Anna Henningsen
parent
commit
beea23af65
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 9
      doc/api/fs.md

9
doc/api/fs.md

@ -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…
Cancel
Save