Package com.google.cloud.storage
Class Storage.BlobListOption
java.lang.Object
com.google.cloud.storage.Option<com.google.cloud.storage.UnifiedOpts.ObjectListOpt>
com.google.cloud.storage.Storage.BlobListOption
- All Implemented Interfaces:
Serializable
- Enclosing interface:
- Storage
public static class Storage.BlobListOption
extends Option<com.google.cloud.storage.UnifiedOpts.ObjectListOpt>
Class for specifying blob list options.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Storage.BlobListOption
If specified, results are returned in a directory-like mode.static Storage.BlobListOption[]
dedupe
(Storage.BlobListOption... os) Deduplicate any options which are the same parameter.static Storage.BlobListOption[]
dedupe
(Storage.BlobListOption[] array, Storage.BlobListOption... os) Deduplicate any options which are the same parameter.static Storage.BlobListOption[]
dedupe
(Collection<Storage.BlobListOption> collection, Storage.BlobListOption... os) Deduplicate any options which are the same parameter.static Storage.BlobListOption
Returns an option to set a delimiter.static Storage.BlobListOption
Returns an option to set a endOffset to filter results to objects whose names are lexicographically before endOffset.boolean
Deprecated.static Storage.BlobListOption
fields
(Storage.BlobField... fields) Returns an option to specify the blob's fields to be returned by the RPC call.int
hashCode()
Deprecated.static Storage.BlobListOption
Returns an option to set a glob pattern to filter results to blobs that match the pattern.static Storage.BlobListOption
pageSize
(long pageSize) Returns an option to specify the maximum number of blobs returned per page.static Storage.BlobListOption
Returns an option to specify the page token from which to start listing blobs.static Storage.BlobListOption
Returns an option to set a prefix to filter results to blobs whose names begin with this prefix.static Storage.BlobListOption
startOffset
(@NonNull String startOffset) Returns an option to set a startOffset to filter results to objects whose names are lexicographically equal to or after startOffset.toString()
Deprecated.static Storage.BlobListOption
userProject
(@NonNull String userProject) Returns an option to define the billing user project.static Storage.BlobListOption
versions
(boolean versions) If set totrue
, lists all versions of a blob.
-
Method Details
-
pageSize
Returns an option to specify the maximum number of blobs returned per page. -
pageToken
@TransportCompatibility({HTTP,GRPC}) public static Storage.BlobListOption pageToken(@NonNull String pageToken) Returns an option to specify the page token from which to start listing blobs. -
prefix
@TransportCompatibility({HTTP,GRPC}) public static Storage.BlobListOption prefix(@NonNull String prefix) Returns an option to set a prefix to filter results to blobs whose names begin with this prefix. -
currentDirectory
If specified, results are returned in a directory-like mode. Blobs whose names, after a possibleprefix(String)
, do not contain the '/' delimiter are returned as is. Blobs whose names, after a possibleprefix(String)
, contain the '/' delimiter, will have their name truncated after the delimiter and will be returned asBlob
objects where onlyBlobInfo.getBlobId()
,BlobInfo.getSize()
andBlobInfo.isDirectory()
are set. For such directory blobs, (BlobId.getGeneration()
returnsnull
),BlobInfo.getSize()
returns0
whileBlobInfo.isDirectory()
returnstrue
. Duplicate directory blobs are omitted. -
delimiter
@TransportCompatibility({HTTP,GRPC}) public static Storage.BlobListOption delimiter(@NonNull String delimiter) Returns an option to set a delimiter.- Parameters:
delimiter
- generally '/' is the one used most often, but you can used other delimiters as well.
-
startOffset
@TransportCompatibility({HTTP,GRPC}) public static Storage.BlobListOption startOffset(@NonNull String startOffset) Returns an option to set a startOffset to filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed have names between startOffset (inclusive) and endOffset (exclusive).- Parameters:
startOffset
- startOffset to filter the results
-
endOffset
@TransportCompatibility({HTTP,GRPC}) public static Storage.BlobListOption endOffset(@NonNull String endOffset) Returns an option to set a endOffset to filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed have names between startOffset (inclusive) and endOffset (exclusive).- Parameters:
endOffset
- endOffset to filter the results
-
matchGlob
@BetaApi @TransportCompatibility(HTTP) public static Storage.BlobListOption matchGlob(@NonNull String glob) Returns an option to set a glob pattern to filter results to blobs that match the pattern.- See Also:
-
userProject
@TransportCompatibility({HTTP,GRPC}) public static Storage.BlobListOption userProject(@NonNull String userProject) Returns an option to define the billing user project. This option is required by buckets with `requester_pays` flag enabled to assign operation costs.- Parameters:
userProject
- projectId of the billing user project.
-
versions
@TransportCompatibility({HTTP,GRPC}) public static Storage.BlobListOption versions(boolean versions) If set totrue
, lists all versions of a blob. The default isfalse
.- See Also:
-
fields
@TransportCompatibility({HTTP,GRPC}) public static Storage.BlobListOption fields(Storage.BlobField... fields) Returns an option to specify the blob's fields to be returned by the RPC call. If this option is not provided all blob's fields are returned.BlobListOption.fields
) can be used to specify only the fields of interest. Blob name and bucket are always returned, even if not specified. -
dedupe
Deduplicate any options which are the same parameter. The value which comes last inos
will be the value included in the return. -
dedupe
@BetaApi public static Storage.BlobListOption[] dedupe(Collection<Storage.BlobListOption> collection, Storage.BlobListOption... os) Deduplicate any options which are the same parameter.The value which comes last in
collection
andos
will be the value included in the return. All options fromos
will override their counterparts incollection
. -
dedupe
@BetaApi public static Storage.BlobListOption[] dedupe(Storage.BlobListOption[] array, Storage.BlobListOption... os) Deduplicate any options which are the same parameter.The value which comes last in
collection
andos
will be the value included in the return. All options fromos
will override their counterparts incollection
. -
equals
Deprecated. -
hashCode
public int hashCode()Deprecated. -
toString
Deprecated.
-