Skip to main content
FileHandle.writev - fs/promises - Node documentation
method FileHandle.writev

Usage in Deno

import { type FileHandle } from "node:fs/promises";
FileHandle.writev(
buffers: readonly ArrayBufferView[],
position?: number,
): Promise<WriteVResult>

Write an array of ArrayBufferView s to the file.

The promise is fulfilled with an object containing a two properties:

It is unsafe to call writev() multiple times on the same file without waiting for the promise to be fulfilled (or rejected).

On Linux, positional writes don't work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to the end of the file.

Parameters

buffers: readonly ArrayBufferView[]
optional
position: number = 'null'

The offset from the beginning of the file where the data from buffers should be written. If position is not a number, the data will be written at the current position.

Return Type

Promise<WriteVResult>