Skip to content

readFile

readFile(this, filename, cb): void

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

Asynchronously reads the entire contents of a file.

unknown

PathLike

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(this, filename, options, callback?): void

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

Asynchronously reads the entire contents of a file.

unknown

PathLike

string

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:163

Asynchronously reads the entire contents of a file.

unknown

PathLike

BufferEncoding | { encoding: BufferEncoding; flag?: string; }

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'.