fs.read(fd, [options,] callback)
fd
<integer>options
<Object>buffer
<Buffer> | <TypedArray> | <DataView> 默认值:Buffer.alloc(16384)
offset
<integer> 默认值:0
length
<integer> 默认值:buffer.byteLength
position
<integer> | <bigint> 默认值:null
callback
<Function>
与 fs.read()
函数类似,此版本采用可选的 options
对象。
如果未指定 options
对象,则默认使用上述值。
fd
<integer>options
<Object>buffer
<Buffer> | <TypedArray> | <DataView> Default:Buffer.alloc(16384)
offset
<integer> Default:0
length
<integer> Default:buffer.byteLength
position
<integer> | <bigint> Default:null
callback
<Function>
Similar to the fs.read()
function, this version takes an optional
options
object. If no options
object is specified, it will default with the
above values.