readSync static method

Result<Uint8List, IoError> readSync(
  1. Path path
)

Reads the entire file contents of a file as bytes.

Implementation

static Result<Uint8List, IoError> readSync(Path path) {
  return Fs.ioGuardSync(() => File(path.asString()).readAsBytesSync());
}