Reads a file as a UTF-8 string.
The absolute path of the file to read.
A promise that resolves to an AsyncIOResult containing the file content as a string.
AsyncIOResult
1.0.0
encoding: 'utf8'
(await readTextFile('/path/to/file.txt')) .inspect(content => console.log(content)); Copy
(await readTextFile('/path/to/file.txt')) .inspect(content => console.log(content));
Reads a file as a UTF-8 string.