listAllObjects method
Returns all Objects in a bucket. This is a shortcut for listObjects. Use listObjects to list buckets with a large number of objects.
Implementation
Future<ListObjectsResult> listAllObjects(
String bucket, {
String prefix = '',
bool recursive = false,
}) async {
final chunks = listObjects(bucket, prefix: prefix, recursive: recursive);
final objects = <Object>[];
final prefixes = <String>[];
await for (final chunk in chunks) {
objects.addAll(chunk.objects);
prefixes.addAll(chunk.prefixes);
}
return ListObjectsResult(
objects: objects,
prefixes: prefixes,
);
}