buffer<Buffer> | <TypedArray> | <DataView> The buffer that the data will be written to.
offset<integer> The position in
bufferto write the data to.
length<integer> The number of bytes to read.
position<integer> | <bigint> | <null> Specifies where to begin reading from in the file. If
-1, data will be read from the current file position, and the file position will be updated. If
positionis an integer, the file position will be unchanged.
Read data from the file specified by
The callback is given the three arguments,
(err, bytesRead, buffer).
If the file is not modified concurrently, the end-of-file is reached when the number of bytes read is zero.
If this method is invoked as its
util.promisify()ed version, it returns
a promise for an