Skip to content

Latest commit

 

History

History
76 lines (39 loc) · 1.18 KB

File metadata and controls

76 lines (39 loc) · 1.18 KB
hide_title true
custom_edit_url
pagination_prev
pagination_next

Home > @rushstack/node-core-library > FileSystem > readFile

FileSystem.readFile() method

Reads the contents of a file into a string. Behind the scenes it uses fs.readFileSync()<></>.

Signature:

static readFile(filePath: string, options?: IFileSystemReadFileOptions): string;

Parameters

Parameter

Type

Description

filePath

string

The relative or absolute path to the file whose contents should be read.

options

IFileSystemReadFileOptions

(Optional) Optional settings that can change the behavior. Type: IReadFileOptions

Returns:

string