readFile
Call Signature
Section titled “Call Signature”readFile(
this,filename,cb):void
Defined in: src/node/async.ts:161
Asynchronously reads the entire contents of a file.
Parameters
Section titled “Parameters”unknown
filename
Section titled “filename”PathLike
Callback<[Uint8Array<ArrayBufferLike>]>
If no encoding is specified, then the raw buffer is returned.
Returns
Section titled “Returns”void
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”readFile(
this,filename,options,callback?):void
Defined in: src/node/async.ts:162
Asynchronously reads the entire contents of a file.
Parameters
Section titled “Parameters”unknown
filename
Section titled “filename”PathLike
options
Section titled “options”string
callback?
Section titled “callback?”Callback<[Uint8Array<ArrayBufferLike>]>
Returns
Section titled “Returns”void
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”readFile(
this,filename,options,cb):void
Defined in: src/node/async.ts:163
Asynchronously reads the entire contents of a file.
Parameters
Section titled “Parameters”unknown
filename
Section titled “filename”PathLike
options
Section titled “options”BufferEncoding | { encoding: BufferEncoding; flag?: string; }
Callback<[string]>
If no encoding is specified, then the raw buffer is returned.
Returns
Section titled “Returns”void
Option
Section titled “Option”encoding The string encoding for the file contents. Defaults to null.
Option
Section titled “Option”flag Defaults to 'r'.