fs.readv(fd, buffers[, position], callback)
fd<integer>- 'buffers' <ArrayBufferView[]>
position<integer> | <null> 默认值:nullcallback<Function>err<Error>bytesRead<integer>- 'buffers' <ArrayBufferView[]>
从由 fd 指定的文件读取数据,并使用 readv() 写入 ArrayBufferView 数组。
【Read from a file specified by fd and write to an array of ArrayBufferViews
using readv().】
position 是指从文件开头开始读取数据的偏移量。如果 typeof position !== 'number',数据将从当前位置开始读取。
回调函数将接收三个参数:err、bytesRead 和 buffers。bytesRead 表示从文件中读取的字节数。
【The callback will be given three arguments: err, bytesRead, and
buffers. bytesRead is how many bytes were read from the file.】
如果以其 util.promisify()ed 版本调用此方法,它会返回一个包含 bytesRead 和 buffers 属性的 Object 的 Promise。
【If this method is invoked as its util.promisify()ed version, it returns
a promise for an Object with bytesRead and buffers properties.】