readBytes method
Reads path fully; throws PayloadTooLargeException above maxBytes.
Implementation
@override
Future<Uint8List> readBytes(String path, {int? maxBytes}) async {
final f = _file(path);
if (maxBytes != null && await f.length() > maxBytes) {
throw PayloadTooLargeException('entry "$path" exceeds $maxBytes bytes');
}
return f.readAsBytes();
}