参数 buffer 现在可以是任何 TypedArray 或 DataView。
buffer
TypedArray
DataView
参数 length 现在可以为 0。
length
0
新增于: v0.1.21
返回 bytesRead 的数量。
bytesRead
The buffer parameter can now be any TypedArray or a DataView.
The length parameter can now be 0.
Added in: v0.1.21
fd
offset
position
null
Returns the number of bytesRead.
For detailed information, see the documentation of the asynchronous version of this API: fs.read().
fs.read()