readToStringSync static method

Result<String, IoError> readToStringSync(
  1. Path path
)

Reads the entire contents of a file into a string.

Implementation

static Result<String, IoError> readToStringSync(Path path) {
  return Fs.ioGuardSync(() => File(path.asString()).readAsStringSync());
}