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.

Source

String readAsStringSync({Encoding encoding: UTF8});