readBytes method
Reads path as bytes.
Implementation
@override
Future<Result<List<int>>> readBytes(String path) async {
if (_readBytesResults.isNotEmpty) {
return _readBytesResults.removeFirst();
}
final String normalized = normalizePath(path);
final List<int>? bytes = _files[normalized];
return bytes == null
? _notFound<List<int>>('readBytes', normalized)
: Ok<List<int>>(List<int>.unmodifiable(bytes));
}