readAsStringSync method

Synchronously read the entire file contents as a string using the given Encoding.

String readAsStringSync(
{Encoding encoding: UTF8}
)

Synchronously read the entire file contents as a string using the given Encoding.

Throws a FileSystemException if the operation fails.