listParts method

Stream<Part> listParts(
  1. String bucket,
  2. String object,
  3. String uploadId
)

Get part-info of all parts of an incomplete upload specified by uploadId.

Implementation

Stream<Part> listParts(
  String bucket,
  String object,
  String uploadId,
) async* {
  MinioInvalidBucketNameError.check(bucket);
  MinioInvalidObjectNameError.check(object);

  var marker = 0;
  var isTruncated = false;
  do {
    final result = await listPartsQuery(bucket, object, uploadId, marker);
    marker = result.nextPartNumberMarker;
    isTruncated = result.isTruncated;
    yield* Stream.fromIterable(result.parts);
  } while (isTruncated);
}