Skip to content

Conversation

@HemangChothani
Copy link
Contributor

@HemangChothani HemangChothani commented Oct 21, 2020

Fixes #294

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 21, 2020
iterator.prefixes = set()
return iterator

def list_prefixes(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending feedback from issue filer. I'm not convinced this is the right path forward.

@frankyn frankyn added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Oct 21, 2020
@lrowe
Copy link

lrowe commented Oct 21, 2020

Looking a little more deeply at the page_iterator and Storage Objects: list JSON API it seems both items and prefixes are always returned in the same response, so adding list_prefixes may encourage API consumers to make twice as many Storage Objects list requests as necessary in cases where they want both prefixes and objects.

Perhaps the more general solution would be to create an listing method that returns an iterator of pages, with each page having both an iterator of prefixes and an iterator or blobs.

@frankyn frankyn closed this Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement. do not merge Indicates a pull request not ready for merge, due to either quality or timing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

There should be a built-in way to list prefixes (directories) in a bucket

3 participants