public final class CloudBlobDirectory extends Object implements ListBlobItem
Containers, which are encapsulated as CloudBlobContainer
objects, hold directories, and directories hold
block blobs and page blobs. Directories can also contain sub-directories.
Modifier and Type | Method and Description |
---|---|
CloudAppendBlob |
getAppendBlobReference(String blobName)
Returns a reference to a
CloudAppendBlob object that represents an append blob in the directory. |
CloudAppendBlob |
getAppendBlobReference(String blobName,
String snapshotID)
Returns a reference to a
CloudAppendBlob object that represents an append blob in the directory, using the
specified snapshot ID. |
CloudBlockBlob |
getBlockBlobReference(String blobName)
Returns a reference to a
CloudBlockBlob object that represents a block blob in this directory. |
CloudBlockBlob |
getBlockBlobReference(String blobName,
String snapshotID)
Returns a reference to a
CloudBlockBlob object that represents a block blob in this directory, using the
specified snapshot ID. |
CloudBlobContainer |
getContainer()
Returns the container for this directory.
|
CloudBlobDirectory |
getDirectoryReference(String directoryName)
Returns a reference to a virtual blob directory beneath this directory.
|
CloudPageBlob |
getPageBlobReference(String blobName)
Returns a reference to a
CloudPageBlob object that represents a page blob in the directory. |
CloudPageBlob |
getPageBlobReference(String blobName,
String snapshotID)
Returns a reference to a
CloudPageBlob object that represents a page blob in the directory, using the
specified snapshot ID. |
CloudBlobDirectory |
getParent()
Returns the parent directory of this directory.
|
String |
getPrefix()
Returns the prefix for this directory.
|
CloudBlobClient |
getServiceClient()
Returns the Blob service client associated with this directory.
|
StorageUri |
getStorageUri()
Returns the list of URIs for all locations.
|
URI |
getUri()
Returns the URI for this directory.
|
Iterable<ListBlobItem> |
listBlobs()
Returns an enumerable collection of blob items for the directory.
|
Iterable<ListBlobItem> |
listBlobs(String prefix)
Returns an enumerable collection of blob items whose names begin with the specified prefix for the directory.
|
Iterable<ListBlobItem> |
listBlobs(String prefix,
boolean useFlatBlobListing,
EnumSet<BlobListingDetails> listingDetails,
BlobRequestOptions options,
OperationContext opContext)
Returns an enumerable collection of blob items whose names begin with the specified prefix, using the specified
flat or hierarchical option, listing details options, request options, and operation context.
|
ResultSegment<ListBlobItem> |
listBlobsSegmented()
Returns a result segment of an enumerable collection of blob items in the directory.
|
ResultSegment<ListBlobItem> |
listBlobsSegmented(String prefix)
Returns a result segment containing a collection of blob items whose names begin with the specified prefix.
|
ResultSegment<ListBlobItem> |
listBlobsSegmented(String prefix,
boolean useFlatBlobListing,
EnumSet<BlobListingDetails> listingDetails,
Integer maxResults,
ResultContinuation continuationToken,
BlobRequestOptions options,
OperationContext opContext)
Returns a result segment containing a collection of blob items whose names begin with the specified prefix, using
the specified flat or hierarchical option, listing details options, request options, and operation context.
|
public CloudAppendBlob getAppendBlobReference(String blobName) throws URISyntaxException, StorageException
CloudAppendBlob
object that represents an append blob in the directory.blobName
- A String
that represents the name of the blob.CloudAppendBlob
object that represents a reference to the specified append blob.StorageException
- If a storage service error occurred.URISyntaxException
- If the resource URI is invalid.public CloudAppendBlob getAppendBlobReference(String blobName, String snapshotID) throws URISyntaxException, StorageException
CloudAppendBlob
object that represents an append blob in the directory, using the
specified snapshot ID.blobName
- A String
that represents the name of the blob.snapshotID
- A String
that represents the snapshot ID of the blob.CloudAppendBlob
object that represents a reference to the specified append blob.StorageException
- If a storage service error occurred.URISyntaxException
- If the resource URI is invalid.public CloudBlockBlob getBlockBlobReference(String blobName) throws URISyntaxException, StorageException
CloudBlockBlob
object that represents a block blob in this directory.blobName
- A String
that represents the name of the blob.CloudBlockBlob
object that represents a reference to the specified block blob.StorageException
- If a storage service error occurred.URISyntaxException
- If the resource URI is invalid.public CloudBlockBlob getBlockBlobReference(String blobName, String snapshotID) throws URISyntaxException, StorageException
CloudBlockBlob
object that represents a block blob in this directory, using the
specified snapshot ID.blobName
- A String
that represents the name of the blob.snapshotID
- A String
that represents the snapshot ID of the blob.CloudBlockBlob
object that represents a reference to the specified block blob.StorageException
- If a storage service error occurred.URISyntaxException
- If the resource URI is invalid.public CloudBlobContainer getContainer() throws StorageException, URISyntaxException
getContainer
in interface ListBlobItem
CloudBlobContainer
that represents the container for this directory.StorageException
- If a storage service error occurred.URISyntaxException
- If the resource URI is invalid.public CloudPageBlob getPageBlobReference(String blobName) throws URISyntaxException, StorageException
CloudPageBlob
object that represents a page blob in the directory.blobName
- A String
that represents the name of the blob.CloudPageBlob
object that represents a reference to the specified page blob.StorageException
- If a storage service error occurred.URISyntaxException
- If the resource URI is invalid.public CloudPageBlob getPageBlobReference(String blobName, String snapshotID) throws URISyntaxException, StorageException
CloudPageBlob
object that represents a page blob in the directory, using the
specified snapshot ID.blobName
- A String
that represents the name of the blob.snapshotID
- A String
that represents the snapshot ID of the blob.CloudPageBlob
object that represents a reference to the specified page blob.StorageException
- If a storage service error occurred.URISyntaxException
- If the resource URI is invalid.public CloudBlobDirectory getParent() throws URISyntaxException, StorageException
getParent
in interface ListBlobItem
CloudBlobDirectory
object that represents the parent of this directory.StorageException
- If a storage service error occurred.URISyntaxException
- If the resource URI is invalid.public String getPrefix()
String
that represents the prefix for this directory.public CloudBlobClient getServiceClient()
CloudBlobClient
object that represents the service client associated with the directory.public CloudBlobDirectory getDirectoryReference(String directoryName) throws URISyntaxException
directoryName
- A String
that represents the name of the virtual subdirectory.CloudBlobDirectory
object that represents a virtual blob directory beneath this directory.URISyntaxException
- If the resource URI is invalid.public URI getUri()
getUri
in interface ListBlobItem
java.net.URI
object that represents the URI for this directory.public final StorageUri getStorageUri()
getStorageUri
in interface ListBlobItem
StorageUri
that represents the list of URIs for all locations..@DoesServiceRequest public Iterable<ListBlobItem> listBlobs() throws StorageException, URISyntaxException
ListBlobItem
objects that represent the block items in this
container.StorageException
- If a storage service error occurred.URISyntaxException
- If the resource URI is invalid.@DoesServiceRequest public Iterable<ListBlobItem> listBlobs(String prefix) throws URISyntaxException, StorageException
prefix
- A String
that represents the blob name prefix.ListBlobItem
objects that represent the block items whose names begin
with the specified prefix in this directory.StorageException
- If a storage service error occurred.URISyntaxException
- If the resource URI is invalid.@DoesServiceRequest public Iterable<ListBlobItem> listBlobs(String prefix, boolean useFlatBlobListing, EnumSet<BlobListingDetails> listingDetails, BlobRequestOptions options, OperationContext opContext) throws URISyntaxException, StorageException
prefix
- A String
that represents the prefix of the blob name.useFlatBlobListing
- true
to indicate that the returned list will be flat; false
to indicate that
the returned list will be hierarchical.listingDetails
- A java.util.EnumSet
object that contains BlobListingDetails
values that indicate
whether snapshots, metadata, and/or uncommitted blocks are returned. Committed blocks are always
returned.options
- A BlobRequestOptions
object that specifies any additional options for the request. Specifying
null
will use the default request options from the associated service client (
CloudBlobClient
).opContext
- An OperationContext
object that represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.ListBlobItem
objects that represent the block items whose names begin
with the specified prefix in this directory.StorageException
- If a storage service error occurred.URISyntaxException
- If the resource URI is invalid.@DoesServiceRequest public ResultSegment<ListBlobItem> listBlobsSegmented() throws StorageException, URISyntaxException
ResultSegment
object that contains a segment of the enumerable collection of
ListBlobItem
objects that represent the blob items in the directory.StorageException
- If a storage service error occurred.URISyntaxException
- If the resource URI is invalid.@DoesServiceRequest public ResultSegment<ListBlobItem> listBlobsSegmented(String prefix) throws StorageException, URISyntaxException
prefix
- A String
that represents the prefix of the blob name.ResultSegment
object that contains a segment of the enumerable collection of
ListBlobItem
objects that represent the blob items whose names begin with the specified prefix in
the directory.StorageException
- If a storage service error occurred.URISyntaxException
- If the resource URI is invalid.@DoesServiceRequest public ResultSegment<ListBlobItem> listBlobsSegmented(String prefix, boolean useFlatBlobListing, EnumSet<BlobListingDetails> listingDetails, Integer maxResults, ResultContinuation continuationToken, BlobRequestOptions options, OperationContext opContext) throws StorageException, URISyntaxException
prefix
- A String
that represents the prefix of the blob name.useFlatBlobListing
- true
to indicate that the returned list will be flat; false
to indicate that
the returned list will be hierarchical.listingDetails
- A java.util.EnumSet
object that contains BlobListingDetails
values that indicate
whether snapshots, metadata, and/or uncommitted blocks are returned. Committed blocks are always
returned.maxResults
- The maximum number of results to retrieve.continuationToken
- A ResultContinuation
object that represents a continuation token returned by a previous
listing operation.options
- A BlobRequestOptions
object that specifies any additional options for the request. Specifying
null
will use the default request options from the associated service client (
CloudBlobClient
).opContext
- An OperationContext
object that represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.ResultSegment
object that contains a segment of the enumerable collection of
ListBlobItem
objects that represent the block items whose names begin with the specified prefix
in the directory.StorageException
- If a storage service error occurred.URISyntaxException
- If the resource URI is invalid.Copyright © 2018. All Rights Reserved.