Send feedback
Class Storage.BlobListOption (2.18.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.18.0 keyboard_arrow_down
public static class Storage . BlobListOption extends Option<UnifiedOpts . ObjectListOpt>
Class for specifying blob list options.
Inheritance
java.lang.Object >
com.google.cloud.storage.UnifiedOpts.OptionShim >
Option >
Storage.BlobListOption
Inherited Members
com.google.cloud.storage.UnifiedOpts.OptionShim.equals(java.lang.Object)
com.google.cloud.storage.UnifiedOpts.OptionShim.hashCode()
com.google.cloud.storage.UnifiedOpts.OptionShim.toString()
Static Methods
currentDirectory()
public static Storage . BlobListOption currentDirectory ()
If specified, results are returned in a directory-like mode. Blobs whose names, after a
possible #prefix(String) , do not contain the '/' delimiter are returned as is. Blobs
whose names, after a possible #prefix(String) , contain the '/' delimiter, will have
their name truncated after the delimiter and will be returned as Blob objects where
only Blob#getBlobId() , Blob#getSize() and Blob#isDirectory() are set.
For such directory blobs, (BlobId#getGeneration() returns null
), Blob#getSize() returns 0
while Blob#isDirectory() returns true
.
Duplicate directory blobs are omitted.
Returns
delimiter(@NonNull String delimiter)
public static Storage . BlobListOption delimiter ( @NonNull String delimiter )
Returns an option to set a delimiter.
Parameter
Name
Description
delimiter
@org.checkerframework.checker.nullness.qual.NonNull java.lang.String
generally '/' is the one used most often, but you can used other delimiters
as well.
Returns
endOffset(@NonNull String endOffset)
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).
Parameter
Name
Description
endOffset
@org.checkerframework.checker.nullness.qual.NonNull java.lang.String
endOffset to filter the results
Returns
fields(Storage.BlobField[] fields)
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.
Parameter
Returns
pageSize(long pageSize)
public static Storage . BlobListOption pageSize ( long pageSize )
Returns an option to specify the maximum number of blobs returned per page.
Parameter
Name
Description
pageSize
long
Returns
pageToken(@NonNull String pageToken)
public static Storage . BlobListOption pageToken ( @NonNull String pageToken )
Returns an option to specify the page token from which to start listing blobs.
Parameter
Name
Description
pageToken
@org.checkerframework.checker.nullness.qual.NonNull java.lang.String
Returns
prefix(@NonNull String prefix)
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.
Parameter
Name
Description
prefix
@org.checkerframework.checker.nullness.qual.NonNull java.lang.String
Returns
startOffset(@NonNull String startOffset)
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).
Parameter
Name
Description
startOffset
@org.checkerframework.checker.nullness.qual.NonNull java.lang.String
startOffset to filter the results
Returns
userProject(@NonNull String userProject)
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.
Parameter
Name
Description
userProject
@org.checkerframework.checker.nullness.qual.NonNull java.lang.String
projectId of the billing user project.
Returns
versions(boolean versions)
public static Storage . BlobListOption versions ( boolean versions )
If set to true
, lists all versions of a blob. The default is false
.
See Also: Object Versioning
Parameter
Returns
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-24 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-09-24 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-24 UTC."]]