list method
Lists keys starting with prefix.
Implementation
@override
Future<List<String>> list(String prefix) async {
final matches = <String>[
for (final key in _objects.keys)
if (key.startsWith(prefix)) key,
];
var bytes = 0;
for (final key in matches) {
bytes += key.length;
}
_stats = ObjectStoreStats(
gets: _stats.gets,
puts: _stats.puts,
deletes: _stats.deletes,
lists: _stats.lists + 1,
requestBytes: _stats.requestBytes + prefix.length,
responseBytes: _stats.responseBytes + bytes,
);
return matches;
}