Reputation: 384
We have almost 100 virtual directories in a container. Now when we run the below code, it returns everything.
foreach (IListBlobItem item in blobContainer.ListBlobs(null, false))
{
if (item.GetType() == typeof(CloudBlockBlob))
{
CloudBlockBlob blob = (CloudBlockBlob)item;
}
}
I'm hoping that if there is a way to get only blobs available under a specific virtual directory?
Upvotes: 1
Views: 1020
Reputation: 384
Ok I found the solution by digging in the SDK.
CloudBlobDirectory blobDirectory = blobContainer.GetDirectoryReference(relativeAddress);
blobDirectory.ListBlobs();
Upvotes: 5