Browse Source

Merge pull request #500 from revelt/patch-1

[documentation] typo found and fixed
ci/travis-osximage
JP Richardson 7 years ago
committed by GitHub
parent
commit
cc6d425189
  1. 2
      docs/fs-read-write.md

2
docs/fs-read-write.md

@ -2,7 +2,7 @@
[`fs.read()`](https://nodejs.org/api/fs.html#fs_fs_read_fd_buffer_offset_length_position_callback) & [`fs.write()`](https://nodejs.org/api/fs.html#fs_fs_write_fd_buffer_offset_length_position_callback) are different from other `fs` methods in that their callbacks are called with 3 arguments instead of the usual 2 arguments.
If you're using them with callbacks, they will behave as usual. However, their promise usage is a little different. `fs-extra` promisifies these methods like [`util.promisify()`](https://nodejs.org/api/util.html#util_util_promisify_original) (only availible in Node 8+) does.
If you're using them with callbacks, they will behave as usual. However, their promise usage is a little different. `fs-extra` promisifies these methods like [`util.promisify()`](https://nodejs.org/api/util.html#util_util_promisify_original) (only available in Node 8+) does.
Here's the example promise usage:

Loading…
Cancel
Save