Skip to content

readFile

readFile(this, filename, cb): void

Defined in: src/node/async.ts:157

Asynchronously reads the entire contents of a file.

unknown

PathOrFileDescriptor

Callback<[Uint8Array<ArrayBufferLike>]>

If no encoding is specified, then the raw buffer is returned.

void

encoding The string encoding for the file contents. Defaults to null.

flag Defaults to 'r'.

readFile<T>(this, filename, options, cb): void

Defined in: src/node/async.ts:158

Asynchronously reads the entire contents of a file.

T extends ArrayBufferView<ArrayBufferLike>

unknown

PathOrFileDescriptor

ReadFileOptionsWithBuffer<T>

Callback<[BufferView<T>]>

If no encoding is specified, then the raw buffer is returned.

void

encoding The string encoding for the file contents. Defaults to null.

flag Defaults to 'r'.

readFile(this, filename, options, callback?): void

Defined in: src/node/async.ts:164

Asynchronously reads the entire contents of a file.

unknown

PathOrFileDescriptor

object & Abortable

Callback<[Uint8Array<ArrayBufferLike>]>

void

encoding The string encoding for the file contents. Defaults to null.

flag Defaults to 'r'.

readFile(this, filename, options, cb): void

Defined in: src/node/async.ts:170

Asynchronously reads the entire contents of a file.

unknown

PathOrFileDescriptor

BufferEncoding | object & Abortable

Callback<[string]>

If no encoding is specified, then the raw buffer is returned.

void

encoding The string encoding for the file contents. Defaults to null.

flag Defaults to 'r'.