Skip to content

Commit

Permalink
Update documentation for prefix, delimiter search (#2537)
Browse files Browse the repository at this point in the history
* Update documentation for prefix, delimiter search

* Remove whitespace.
  • Loading branch information
frankyn authored Nov 15, 2019
1 parent 41b70f4 commit 2f52327
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions storage/cloud-client/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,21 @@ def list_blobs_with_prefix(bucket_name, prefix, delimiter=None):
"files" in the given "folder". Without the delimiter, the entire tree under
the prefix is returned. For example, given these blobs:
/a/1.txt
/a/b/2.txt
a/1.txt
a/b/2.txt
If you just specify prefix = '/a', you'll get back:
If you just specify prefix = 'a', you'll get back:
/a/1.txt
/a/b/2.txt
a/1.txt
a/b/2.txt
However, if you specify prefix='/a' and delimiter='/', you'll get back:
However, if you specify prefix='a' and delimiter='/', you'll get back:
/a/1.txt
a/1.txt
Additionally, the same request will return blobs.prefixes populated with:
a/b/
"""
storage_client = storage.Client()

Expand Down

0 comments on commit 2f52327

Please sign in to comment.