Skip to content

Commit

Permalink
storage: include information on a bucket prefix (googleapis#3671)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankyn authored and pongad committed Sep 14, 2018
1 parent 713cb88 commit c901932
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ public Blob getBlobFromIdWithMetageneration(String bucketName, String blobName,
// [VARIABLE "bucket_"]
public Page<Bucket> listBucketsWithSizeAndPrefix(String prefix) {
// [START listBucketsWithSizeAndPrefix]
// Include a prefix of bucket-name to reduce search space.
// For more information read https://cloud.google.com/storage/docs/json_api/v1/buckets/list
Page<Bucket> buckets = storage.list(BucketListOption.pageSize(100),
BucketListOption.prefix(prefix));
for (Bucket bucket : buckets.iterateAll()) {
Expand Down

0 comments on commit c901932

Please sign in to comment.