diff --git a/doc/api/fs.md b/doc/api/fs.md index 03bb798e016672..2831d5dbbc1708 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2775,6 +2775,29 @@ The callback is given the three arguments, `(err, bytesRead, buffer)`. If this method is invoked as its [`util.promisify()`][]ed version, it returns a `Promise` for an `Object` with `bytesRead` and `buffer` properties. +## `fs.read(fd, [options,] callback)` + +* `fd` {integer} +* `options` {Object} + * `buffer` {Buffer|TypedArray|DataView} **Default:** `Buffer.alloc(16384)` + * `offset` {integer} **Default:** `0` + * `length` {integer} **Default:** `buffer.length` + * `position` {integer} **Default:** `null` +* `callback` {Function} + * `err` {Error} + * `bytesRead` {integer} + * `buffer` {Buffer} + +Similar to the above `fs.read` function, this version takes an optional `options` object. +If no `options` object is specified, it will default with the above values. + ## `fs.readdir(path[, options], callback)` +* `options` {Object} + * `buffer` {Buffer|Uint8Array} **Default:** `Buffer.alloc(16384)` + * `offset` {integer} **Default:** `0` + * `length` {integer} **Default:** `buffer.length` + * `position` {integer} **Default:** `null` +* Returns: {Promise} + #### `filehandle.readFile(options)`