Synchronous version of readTextFile. Reads a file as a UTF-8 string.
readTextFile
The absolute path of the file to read.
An IOResult containing the file content as a string.
IOResult
readTextFile for the async version.
1.1.0
readTextFileSync('/path/to/file.txt') .inspect(content => console.log(content)); Copy
readTextFileSync('/path/to/file.txt') .inspect(content => console.log(content));
Synchronous version of
readTextFile. Reads a file as a UTF-8 string.