Skip to content

Commit

Permalink
doc: fix incorrect fs.readFileSync example output
Browse files Browse the repository at this point in the history
This fixes an incorrect example in the documentation for calling
`fs.readFileSync` on a directory. The example was presumably copied from
the documentation for `fs.readFile`, which has an error argument in its
callback.

PR-URL: #20902
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
not-an-aardvark authored and targos committed May 25, 2018
1 parent 4963bcc commit be2a467
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2367,7 +2367,7 @@ fs.readFileSync('<directory>');
// => [Error: EISDIR: illegal operation on a directory, read <directory>]

// FreeBSD
fs.readFileSync('<directory>'); // => null, <data>
fs.readFileSync('<directory>'); // => <data>
```

## fs.readlink(path[, options], callback)
Expand Down

0 comments on commit be2a467

Please sign in to comment.