ListBlobs Method
List the blobs under a specified container.
Syntax
azureblob.listBlobs([callback])
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for this method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This method will list the blobs contained within the container specified by ContainerName. All returned blobs will be stored within Blobs. The BlobList event will also fire for each blob in the list.
Metadata, snapshots, and uncommitted blobs are not returned in a blob listing unless they are specified to be returned. The following properties can be set to include one or more of these subsets within a blob listing:
IncludeMetadata | When set to true, the Metadata event will fire for each piece of metadata returned. |
IncludeSnapshots | When set to true, snapshot blobs will be included within the returned blob listing and stored within Blobs. BlobsSnapshot can be queried to determine if the blob is a snapshot or not. |
IncludeUncommittedBlobs | When set to true, blobs containing uploaded but uncommitted blocks will be included within the returned blob listing and stored within Blobs. Uncommitted blobs will not have any of the following properties, thus they can be queried to determine if the blob is an uncommitted one. These properties are BlobsLastModified, BlobsETag, BlobsContentType, BlobsContentEncoding, BlobsContentLanguage, and BlobsCacheControl. Uncommitted blobs will also not have any Metadata associated with it. |
If there are more than MaxResults results, Marker will be populated with the marker identifying the position in the results. Subsequent ListBlobs calls will return the next portion of results. If Marker is an empty string, the end of the list has been reached.
List results can be filtered by using the BlobDelimiter and Prefix properties, which also help you traverse a virtual namespace.