From c901932518bd5c18c046297ff0b8f6eb91b97013 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Fri, 14 Sep 2018 16:32:53 -0700 Subject: [PATCH] storage: include information on a bucket prefix (#3671) --- .../google/cloud/examples/storage/snippets/StorageSnippets.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java b/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java index 438f3c1a455f..729b65b3b950 100644 --- a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java +++ b/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java @@ -273,6 +273,8 @@ public Blob getBlobFromIdWithMetageneration(String bucketName, String blobName, // [VARIABLE "bucket_"] public Page 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 buckets = storage.list(BucketListOption.pageSize(100), BucketListOption.prefix(prefix)); for (Bucket bucket : buckets.iterateAll()) {