How to create a sub directory in a blob container
for example,
in my blob container http://veda.blob.core.windows.net/document/
If I store some files it
There is a comment by @afr0 asking how to filter on folders..
There is two ways using the GetDirectoryReference or 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);
}
}
read this for more in depth coverage: http://www.codeproject.com/Articles/297052/Azure-Storage-Blobs-Service-Working-with-Directori