public static AzureBlobDirectory GetBlobDirectory(this CloudBlobClient client, string folderName) { var parts = client.CutFolder(folderName); var container = client.GetContainerReference(parts.ContainerName); return(parts.Subfolder != null ? new AzureBlobDirectory(container, container.GetDirectoryReference(parts.Subfolder)) : new AzureBlobDirectory(container, null)); }