fs.readv(fd, buffers[, position], callback)


从由 fd 指定的文件读取数据,并使用 readv() 写入 ArrayBufferView 数组。

【Read from a file specified by fd and write to an array of ArrayBufferViews using readv().】

position 是指从文件开头开始读取数据的偏移量。如果 typeof position !== 'number',数据将从当前位置开始读取。

回调函数将接收三个参数:errbytesReadbuffersbytesRead 表示从文件中读取的字节数。

【The callback will be given three arguments: err, bytesRead, and buffers. bytesRead is how many bytes were read from the file.】

如果以其 util.promisify()ed 版本调用此方法,它会返回一个包含 bytesReadbuffers 属性的 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.】