public IEnumerable<IStorageFolder> ListFolders(string path)
{
path = path ?? String.Empty;
var container = EnsurePathIsRelativeAndEnsureContainer(ref path);
// return root folders
if (path == String.Empty)
{
return container.ListBlobs()
.OfType<CloudBlobDirectory>()
.Select<CloudBlobDirectory, IStorageFolder>(d => new AzureBlobFolderStorage(d, this))
.ToList();
}
return container.GetDirectoryReference(path)
.ListBlobs()
.OfType<CloudBlobDirectory>()
.Select<CloudBlobDirectory, IStorageFolder>(d => new AzureBlobFolderStorage(d, this))
.ToList();
}