There are two ways:
- using the GetDirectoryReference
- looping through a containers blobs and checking the type
The code below is in C#
CloudBlobContainer container = blobClient.GetContainerReference("photos");
//Method 1. grab a folder reference directly from the container
CloudBlobDirectory folder = container.GetDirectoryReference("directoryName");
//Method 2. Loop over container and grab folders.
foreach (IListBlobItem item in container.ListBlobs(null, false))
{
if (item.GetType() == typeof(CloudBlobDirectory))
{
// we know this is a sub directory now
CloudBlobDirectory subFolder = (CloudBlobDirectory)item;
Console.WriteLine("Directory: {0}", subFolder.Uri);
}
}