Skip to content

Commit 5dda48c

Browse files
committed
Update Storage and Bucket snippets
1 parent 882bf91 commit 5dda48c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

gcloud-java-storage/src/main/java/com/google/cloud/storage/Bucket.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,8 @@ public boolean delete(BucketSourceOption... options) {
618618
*
619619
* <p>Example of listing the blobs in the bucket.
620620
* <pre> {@code
621-
* Iterator<Blob> blobIterator = bucket.list().iterateAll();
621+
* Page<Blob> blobs = bucket.list();
622+
* Iterator<Blob> blobIterator = blobs.iterateAll();
622623
* while (blobIterator.hasNext()) {
623624
* Blob blob = blobIterator.next();
624625
* // do something with the blob

gcloud-java-storage/src/main/java/com/google/cloud/storage/Storage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,10 +1371,10 @@ public static Builder builder() {
13711371
* Lists the bucket's blobs. If the {@link BlobListOption#currentDirectory()} option is provided,
13721372
* results are returned in a directory-like mode.
13731373
*
1374-
* <p>Example of listing buckets, specifying the page size and a name prefix.
1374+
* <p>Example of listing blobs in a provided directory.
13751375
* <pre> {@code
13761376
* String bucketName = "my_unique_bucket";
1377-
* String directory = "my_directory";
1377+
* String directory = "my_directory/";
13781378
* Page<Blob> blobs = storage.list(bucketName, BlobListOption.currentDirectory(),
13791379
* BlobListOption.prefix(directory));
13801380
* Iterator<Blob> blobIterator = blobs.iterateAll();

0 commit comments

Comments
 (0)