Skip to content

readFileSync

readFileSync(this, path, options?): NonSharedBuffer

Defined in: src/node/sync.ts:146

Synchronously reads the entire contents of a file.

unknown

PathOrFileDescriptor

{ flag?: string; } | null

NonSharedBuffer

file contents

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

flag Defaults to 'r'.

readFileSync(this, path, options?): string

Defined in: src/node/sync.ts:147

Synchronously reads the entire contents of a file.

unknown

PathOrFileDescriptor

BufferEncoding | EncodingOption & { flag?: string | undefined; } | null

string

file contents

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

flag Defaults to 'r'.