Microsoft Azure Storage Client Library for C++  7.5.0
The Microsoft Azure Storage Client Library for C++ is a library for working with the Azure Storage Services in C++.
Public Member Functions | List of all members
azure::storage::cloud_blob_directory Class Reference

Represents a virtual directory of blobs, designated by a delimiter character. More...

Public Member Functions

 cloud_blob_directory ()
 Initializes a new instance of the azure::storage::cloud_blob_directory class. More...
 
WASTORAGE_API cloud_blob get_blob_reference (utility::string_t blob_name) const
 Gets a reference to a blob in this virtual directory. More...
 
WASTORAGE_API cloud_blob get_blob_reference (utility::string_t blob_name, utility::string_t snapshot_time) const
 Gets a reference to a blob in this virtual directory. More...
 
WASTORAGE_API cloud_page_blob get_page_blob_reference (utility::string_t blob_name) const
 Gets a reference to a page blob in this virtual directory. More...
 
WASTORAGE_API cloud_page_blob get_page_blob_reference (utility::string_t blob_name, utility::string_t snapshot_time) const
 Gets a reference to a page blob in this virtual directory. More...
 
WASTORAGE_API cloud_block_blob get_block_blob_reference (utility::string_t blob_name) const
 Gets a reference to a block blob in this virtual directory. More...
 
WASTORAGE_API cloud_block_blob get_block_blob_reference (utility::string_t blob_name, utility::string_t snapshot_time) const
 Gets a reference to a block blob in this virtual directory. More...
 
WASTORAGE_API cloud_append_blob get_append_blob_reference (utility::string_t blob_name) const
 Gets a reference to an append blob in this virtual directory. More...
 
WASTORAGE_API cloud_append_blob get_append_blob_reference (utility::string_t blob_name, utility::string_t snapshot_time) const
 Gets a reference to an append blob in this virtual directory. More...
 
WASTORAGE_API cloud_blob_directory get_subdirectory_reference (utility::string_t name) const
 Returns a virtual subdirectory within this virtual directory. More...
 
WASTORAGE_API cloud_blob_directory get_parent_reference () const
 Gets the azure::storage::cloud_blob_directory object representing the parent directory for the current virtual directory. More...
 
list_blob_item_iterator list_blobs () const
 Returns an azure::storage::list_blob_item_iterator that can be used to to lazily enumerate a collection of blob items in the virtual directory. More...
 
WASTORAGE_API list_blob_item_iterator list_blobs (bool use_flat_blob_listing, blob_listing_details::values includes, int max_results, const blob_request_options &options, operation_context context) const
 Returns an azure::storage::list_blob_item_iterator that can be used to to lazily enumerate a collection of blob items in the the virtual directory. More...
 
list_blob_item_segment list_blobs_segmented (const continuation_token &token) const
 Returns a result segment containing a collection of blob items in the container. More...
 
list_blob_item_segment list_blobs_segmented (bool use_flat_blob_listing, blob_listing_details::values includes, int max_results, const continuation_token &token, const blob_request_options &options, operation_context context) const
 Returns an azure::storage::list_blob_item_segment containing a collection of blob items in the container. More...
 
pplx::task< list_blob_item_segmentlist_blobs_segmented_async (const continuation_token &token) const
 Initiates an asynchronous operation to return an azure::storage::list_blob_item_segment containing a collection of blob items in the container. More...
 
pplx::task< list_blob_item_segmentlist_blobs_segmented_async (bool use_flat_blob_listing, blob_listing_details::values includes, int max_results, const continuation_token &token, const blob_request_options &options, operation_context context) const
 Initiates an asynchronous operation to return an azure::storage::list_blob_item_segment containing a collection of blob items in the container. More...
 
WASTORAGE_API pplx::task< list_blob_item_segmentlist_blobs_segmented_async (bool use_flat_blob_listing, blob_listing_details::values includes, int max_results, const continuation_token &token, const blob_request_options &options, operation_context context, const pplx::cancellation_token &cancellation_token) const
 Initiates an asynchronous operation to return an azure::storage::list_blob_item_segment containing a collection of blob items in the container. More...
 
const cloud_blob_clientservice_client () const
 Gets the Blob service client for the virtual directory. More...
 
const cloud_blob_containercontainer () const
 Gets an azure::storage::cloud_blob_container object representing the virtual directory's container. More...
 
const storage_uriuri () const
 Gets the virtual directory URI for all locations. More...
 
const utility::string_t & prefix () const
 Gets the prefix for the virtual directory. More...
 
bool is_valid () const
 Indicates whether the azure::storage::cloud_blob_directory object is valid. More...
 

Detailed Description

Represents a virtual directory of blobs, designated by a delimiter character.

Containers, which are encapsulated as azure::storage::cloud_blob_container objects, hold directories, and directories hold block blobs and page blobs. Directories can also contain sub-directories.

Constructor & Destructor Documentation

◆ cloud_blob_directory()

azure::storage::cloud_blob_directory::cloud_blob_directory ( )
inline

Initializes a new instance of the azure::storage::cloud_blob_directory class.

Member Function Documentation

◆ container()

const cloud_blob_container& azure::storage::cloud_blob_directory::container ( ) const
inline

Gets an azure::storage::cloud_blob_container object representing the virtual directory's container.

Returns
The virtual directory's container.

◆ get_append_blob_reference() [1/2]

WASTORAGE_API cloud_append_blob azure::storage::cloud_blob_directory::get_append_blob_reference ( utility::string_t  blob_name) const

Gets a reference to an append blob in this virtual directory.

Parameters
blob_nameThe name of the blob.
Returns
A reference to a cloud_append_blob.

◆ get_append_blob_reference() [2/2]

WASTORAGE_API cloud_append_blob azure::storage::cloud_blob_directory::get_append_blob_reference ( utility::string_t  blob_name,
utility::string_t  snapshot_time 
) const

Gets a reference to an append blob in this virtual directory.

Parameters
blob_nameThe name of the blob.
snapshot_timeThe snapshot timestamp, if the blob is a snapshot.
Returns
A reference to a cloud_append_blob.

◆ get_blob_reference() [1/2]

WASTORAGE_API cloud_blob azure::storage::cloud_blob_directory::get_blob_reference ( utility::string_t  blob_name) const

Gets a reference to a blob in this virtual directory.

Parameters
blob_nameThe name of the blob.
Returns
A reference to an azure::storage::cloud_blob.

◆ get_blob_reference() [2/2]

WASTORAGE_API cloud_blob azure::storage::cloud_blob_directory::get_blob_reference ( utility::string_t  blob_name,
utility::string_t  snapshot_time 
) const

Gets a reference to a blob in this virtual directory.

Parameters
blob_nameThe name of the blob.
snapshot_timeThe snapshot timestamp, if the blob is a snapshot.
Returns
A reference to an azure::storage::cloud_blob.

◆ get_block_blob_reference() [1/2]

WASTORAGE_API cloud_block_blob azure::storage::cloud_blob_directory::get_block_blob_reference ( utility::string_t  blob_name) const

Gets a reference to a block blob in this virtual directory.

Parameters
blob_nameThe name of the blob.
Returns
A reference to an azure::storage::cloud_block_blob.

◆ get_block_blob_reference() [2/2]

WASTORAGE_API cloud_block_blob azure::storage::cloud_blob_directory::get_block_blob_reference ( utility::string_t  blob_name,
utility::string_t  snapshot_time 
) const

Gets a reference to a block blob in this virtual directory.

Parameters
blob_nameThe name of the blob.
snapshot_timeThe snapshot timestamp, if the blob is a snapshot.
Returns
A reference to an azure::storage::cloud_block_blob.

◆ get_page_blob_reference() [1/2]

WASTORAGE_API cloud_page_blob azure::storage::cloud_blob_directory::get_page_blob_reference ( utility::string_t  blob_name) const

Gets a reference to a page blob in this virtual directory.

Parameters
blob_nameThe name of the blob.
Returns
A reference to an azure::storage::cloud_page_blob.

◆ get_page_blob_reference() [2/2]

WASTORAGE_API cloud_page_blob azure::storage::cloud_blob_directory::get_page_blob_reference ( utility::string_t  blob_name,
utility::string_t  snapshot_time 
) const

Gets a reference to a page blob in this virtual directory.

Parameters
blob_nameThe name of the blob.
snapshot_timeThe snapshot timestamp, if the blob is a snapshot.
Returns
A reference to an azure::storage::cloud_page_blob.

◆ get_parent_reference()

WASTORAGE_API cloud_blob_directory azure::storage::cloud_blob_directory::get_parent_reference ( ) const

Gets the azure::storage::cloud_blob_directory object representing the parent directory for the current virtual directory.

Returns
The virtual directory's parent directory.

◆ get_subdirectory_reference()

WASTORAGE_API cloud_blob_directory azure::storage::cloud_blob_directory::get_subdirectory_reference ( utility::string_t  name) const

Returns a virtual subdirectory within this virtual directory.

Parameters
nameThe name of the virtual subdirectory.
Returns
An azure::storage::cloud_blob_directory object representing the virtual subdirectory.

◆ is_valid()

bool azure::storage::cloud_blob_directory::is_valid ( ) const
inline

Indicates whether the azure::storage::cloud_blob_directory object is valid.

Returns
true if the azure::storage::cloud_blob_directory object is valid; otherwise, false.

◆ list_blobs() [1/2]

list_blob_item_iterator azure::storage::cloud_blob_directory::list_blobs ( ) const
inline

Returns an azure::storage::list_blob_item_iterator that can be used to to lazily enumerate a collection of blob items in the virtual directory.

Returns
An azure::storage::list_blob_item_iterator that can be used to to lazily enumerate a collection of blob items in the virtual directory.

◆ list_blobs() [2/2]

WASTORAGE_API list_blob_item_iterator azure::storage::cloud_blob_directory::list_blobs ( bool  use_flat_blob_listing,
blob_listing_details::values  includes,
int  max_results,
const blob_request_options options,
operation_context  context 
) const

Returns an azure::storage::list_blob_item_iterator that can be used to to lazily enumerate a collection of blob items in the the virtual directory.

Parameters
use_flat_blob_listingIndicates whether to list blobs in a flat listing, or whether to list blobs hierarchically, by virtual directory.
includesAn azure::storage::blob_listing_details::values enumeration describing which items to include in the listing.
max_resultsA non-negative integer value that indicates the maximum number of results to be returned. If this value is zero, the maximum possible number of results will be returned.
optionsAn azure::storage::blob_request_options object that specifies additional options for the request.
contextAn azure::storage::operation_context object that represents the context for the current operation.
Returns
An azure::storage::list_blob_item_iterator that can be used to to lazily enumerate a collection of blob items in the the virtual directory.

◆ list_blobs_segmented() [1/2]

list_blob_item_segment azure::storage::cloud_blob_directory::list_blobs_segmented ( const continuation_token token) const
inline

Returns a result segment containing a collection of blob items in the container.

Parameters
tokenA continuation token returned by a previous listing operation.
Returns
An azure::storage::list_blob_item_segment containing a collection of blob items in the container.

◆ list_blobs_segmented() [2/2]

list_blob_item_segment azure::storage::cloud_blob_directory::list_blobs_segmented ( bool  use_flat_blob_listing,
blob_listing_details::values  includes,
int  max_results,
const continuation_token token,
const blob_request_options options,
operation_context  context 
) const
inline

Returns an azure::storage::list_blob_item_segment containing a collection of blob items in the container.

Parameters
use_flat_blob_listingIndicates whether to list blobs in a flat listing, or whether to list blobs hierarchically, by virtual directory.
includesAn azure::storage::blob_listing_details::values enumeration describing which items to include in the listing.
max_resultsA non-negative integer value that indicates the maximum number of results to be returned at a time, up to the per-operation limit of 5000. If this value is 0, the maximum possible number of results will be returned, up to 5000.
Parameters
tokenA continuation token returned by a previous listing operation.
optionsAn azure::storage::blob_request_options object that specifies additional options for the request.
contextAn azure::storage::operation_context object that represents the context for the current operation.
Returns
An azure::storage::list_blob_item_segment containing a collection of blob items in the container.

◆ list_blobs_segmented_async() [1/3]

pplx::task<list_blob_item_segment> azure::storage::cloud_blob_directory::list_blobs_segmented_async ( const continuation_token token) const
inline

Initiates an asynchronous operation to return an azure::storage::list_blob_item_segment containing a collection of blob items in the container.

Parameters
tokenA continuation token returned by a previous listing operation.
Returns
A pplx::task object of type azure::storage::list_blob_item_segment that that represents the current operation.

◆ list_blobs_segmented_async() [2/3]

pplx::task<list_blob_item_segment> azure::storage::cloud_blob_directory::list_blobs_segmented_async ( bool  use_flat_blob_listing,
blob_listing_details::values  includes,
int  max_results,
const continuation_token token,
const blob_request_options options,
operation_context  context 
) const
inline

Initiates an asynchronous operation to return an azure::storage::list_blob_item_segment containing a collection of blob items in the container.

Parameters
use_flat_blob_listingIndicates whether to list blobs in a flat listing, or whether to list blobs hierarchically, by virtual directory.
includesAn azure::storage::blob_listing_details::values enumeration describing which items to include in the listing.
max_resultsA non-negative integer value that indicates the maximum number of results to be returned at a time, up to the per-operation limit of 5000. If this value is 0, the maximum possible number of results will be returned, up to 5000.
Parameters
tokenA continuation token returned by a previous listing operation.
optionsAn azure::storage::blob_request_options object that specifies additional options for the request.
contextAn azure::storage::operation_context object that represents the context for the current operation.
Returns
A pplx::task object of type azure::storage::list_blob_item_segment that represents the current operation.

◆ list_blobs_segmented_async() [3/3]

WASTORAGE_API pplx::task<list_blob_item_segment> azure::storage::cloud_blob_directory::list_blobs_segmented_async ( bool  use_flat_blob_listing,
blob_listing_details::values  includes,
int  max_results,
const continuation_token token,
const blob_request_options options,
operation_context  context,
const pplx::cancellation_token &  cancellation_token 
) const

Initiates an asynchronous operation to return an azure::storage::list_blob_item_segment containing a collection of blob items in the container.

Parameters
use_flat_blob_listingIndicates whether to list blobs in a flat listing, or whether to list blobs hierarchically, by virtual directory.
includesAn azure::storage::blob_listing_details::values enumeration describing which items to include in the listing.
max_resultsA non-negative integer value that indicates the maximum number of results to be returned at a time, up to the per-operation limit of 5000. If this value is 0, the maximum possible number of results will be returned, up to 5000.
Parameters
tokenA continuation token returned by a previous listing operation.
optionsAn azure::storage::blob_request_options object that specifies additional options for the request.
contextAn azure::storage::operation_context object that represents the context for the current operation.
cancellation_tokenAn pplx::cancellation_token object that is used to cancel the current operation.
Returns
A pplx::task object of type azure::storage::list_blob_item_segment that represents the current operation.

◆ prefix()

const utility::string_t& azure::storage::cloud_blob_directory::prefix ( ) const
inline

Gets the prefix for the virtual directory.

Returns
A string containing the prefix.

◆ service_client()

const cloud_blob_client& azure::storage::cloud_blob_directory::service_client ( ) const
inline

Gets the Blob service client for the virtual directory.

Returns
A client object that specifies the endpoint for the Windows Azure Blob service.

◆ uri()

const storage_uri& azure::storage::cloud_blob_directory::uri ( ) const
inline

Gets the virtual directory URI for all locations.

Returns
An azure::storage::storage_uri containing the virtual directory URI for all locations.