Skip to content

Commit

Permalink
doc: clarify fd closing by fs.readFile etc.
Browse files Browse the repository at this point in the history
Ref: #7560
PR-URL: #7561
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
kibertoad authored and cjihrig committed Aug 10, 2016
1 parent c843e58 commit dedfcb7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions doc/api/fs.md
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dedfcb7

Please sign in to comment.