Skip to main content

readv

function readv
Jump to headingreadv(
fd: number,
buffers: readonly ArrayBufferView[],
cb: (
err: ErrnoException | null,
bytesRead: number,
buffers: ArrayBufferView[],
) => void
,
): void

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

position is the offset from the beginning of the file from where data should be read. If typeof position !== 'number', the data will be read from the current position.

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

If this method is invoked as its util.promisify() ed version, it returns a promise for an Object with bytesRead and buffers properties.

Parameters Jump to heading

Jump to headingbuffers: readonly ArrayBufferView[]
Jump to headingcb: (
err: ErrnoException | null,
bytesRead: number,
buffers: ArrayBufferView[],
) => void

Return Type Jump to heading

void
Jump to headingreadv(
fd: number,
buffers: readonly ArrayBufferView[],
position: number,
cb: (
err: ErrnoException | null,
bytesRead: number,
buffers: ArrayBufferView[],
) => void
,
): void

Parameters Jump to heading

Jump to headingbuffers: readonly ArrayBufferView[]
Jump to headingposition: number
Jump to headingcb: (
err: ErrnoException | null,
bytesRead: number,
buffers: ArrayBufferView[],
) => void

Return Type Jump to heading

void
Back to top