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: nodejs#20902
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
not-an-aardvark committed May 23, 2018
1 parent 7f610a1 commit 5823938
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 @@ -2377,7 +2377,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 5823938

Please sign in to comment.