Skip to content

Commit

Permalink
feat(storage): allow specifying includeTrailingDelimiter
Browse files Browse the repository at this point in the history
  • Loading branch information
gaul committed Feb 12, 2022
1 parent d1ad921 commit 733f824
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions storage/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -1543,6 +1543,7 @@ func (it *ObjectIterator) fetch(pageSize int, pageToken string) (string, error)
req.StartOffset(it.query.StartOffset)
req.EndOffset(it.query.EndOffset)
req.Versions(it.query.Versions)
req.IncludeTrailingDelimiter(it.query.IncludeTrailingDelimiter)
if len(it.query.fieldSelection) > 0 {
req.Fields("nextPageToken", googleapi.Field(it.query.fieldSelection))
}
Expand Down
5 changes: 5 additions & 0 deletions storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,11 @@ type Query struct {
// which returns all properties. Passing ProjectionNoACL will omit Owner and ACL,
// which may improve performance when listing many objects.
Projection Projection

// If true, objects that end in exactly one instance of delimiter have
// their metadata included in items[] in addition to the relevant part of
// the object name appearing in prefixes[].
IncludeTrailingDelimiter bool
}

// attrToFieldMap maps the field names of ObjectAttrs to the underlying field
Expand Down

0 comments on commit 733f824

Please sign in to comment.