readBytes method

  1. @override
Future<Uint8List> readBytes(
  1. String path
)
override

Reads the bytes of the file at path.

Throws when nothing, or a directory, sits at path.

Implementation

@override
Future<Uint8List> readBytes(String path) async {
  final Uint8List? bytes = _files[_resolve(path)];
  if (bytes == null) {
    throw StateError('no file at "$path"');
  }
  return bytes;
}