method promises.FileHandle.read
Usage in Deno
import { type promises } from "node:fs";
FileHandle.read<T extends ArrayBufferView>(buffer: T,offset?: number | null,length?: number | null,position?: number | null,): Promise<FileReadResult<T>>
Reads data from the file and stores that in the given buffer.
If the file is not modified concurrently, the end-of-file is reached when the number of bytes read is zero.
buffer: T
A buffer that will be filled with the file data read.
Promise<FileReadResult<T>>
Fulfills upon success with an object with two properties:
FileHandle.read<T extends ArrayBufferView = Buffer>(options?: FileReadOptions<T>): Promise<FileReadResult<T>>