-
Notifications
You must be signed in to change notification settings - Fork 168
Closed
Labels
api: storageIssues related to the googleapis/python-storage API.Issues related to the googleapis/python-storage API.samplesIssues that are directly related to samples.Issues that are directly related to samples.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
Environment details
- OS type and version: Windows 10
- Python version: 3.9.13
- pip version: 22.0.4
google-cloud-storageversion: 2.5.0
Steps to reproduce
- Download the sample code for listing files with a prefix.
- Comment out the lines 56-58 that print the names of each blob.
- Create a google cloud storage bucket with a subfolder, and a file within that subfolder.
- Run the sample where it specifies the subfolder as the prefix with slash at the end (as shown) and the delimiter of
'/'. - Nothing is displayed (the prefixes are empty).
- Un-comment the lines that print the names of each blob.
- Run it again.
- The prefixes are displayed.
It appears you cannot list the prefixes unless you iterate the files first. This seems strange.
If it's intended, maybe this library should pre-iterate the list so this doesn't happen? Or at least document that this is expected?
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the googleapis/python-storage API.Issues related to the googleapis/python-storage API.samplesIssues that are directly related to samples.Issues that are directly related to samples.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.