I am trying to do an non-recursive list using gcloud-java storage on GCS bucket outside appengine based on this suggestion
However it seems that its not working as expected, namely it is still listing all the files although I have set the Storage.BlobListOption.recursive(false)
my code structure is basically like:
Storage client = StorageOptions.defaultInstance().service();
Page<Blob> blobPage = client.list(my_bucket, Storage.BlobListOption.recursive(false));
for (Blob blob : blobPage.values()) {
// it is still iterating all the leaf files in my_bucket
}
Actually later on I found that it seems that none of BlobListOption
seems to be taking affect (maxResults
, prefix
) and list will just return all leaf files no matter what...
Am I using the API wrong or what might be the problem?