readFileSync
Call Signature
Section titled “Call Signature”readFileSync(
this,path,options?):NonSharedBuffer
Defined in: src/node/sync.ts:146
Synchronously reads the entire contents of a file.
Parameters
Section titled “Parameters”unknown
PathOrFileDescriptor
options?
Section titled “options?”{ flag?: string; } | null
Returns
Section titled “Returns”NonSharedBuffer
file contents
Option
Section titled “Option”encoding The string encoding for the file contents. Defaults to null.
Option
Section titled “Option”flag Defaults to 'r'.
Call Signature
Section titled “Call Signature”readFileSync(
this,path,options?):string
Defined in: src/node/sync.ts:147
Synchronously reads the entire contents of a file.
Parameters
Section titled “Parameters”unknown
PathOrFileDescriptor
options?
Section titled “options?”BufferEncoding | EncodingOption & { flag?: string | undefined; } | null
Returns
Section titled “Returns”string
file contents
Option
Section titled “Option”encoding The string encoding for the file contents. Defaults to null.
Option
Section titled “Option”flag Defaults to 'r'.