0
我想创建文件夹和子文件夹,我发现this workaround: 但是当我列出了他们:使用此代码(source):Azure API为什么不列出名为/ folder/folder/file的blob?
foreach (IListBlobItem item in Container.ListBlobs(null, false))
{
if (item.GetType() == typeof(CloudBlockBlob))
{
CloudBlockBlob blob = (CloudBlockBlob)item;
Console.WriteLine("Block blob of length {0}: {1}", blob.Properties.Length, blob.Uri);
}
else if (item.GetType() == typeof(CloudPageBlob))
{
CloudPageBlob pageBlob = (CloudPageBlob)item;
Console.WriteLine("Page blob of length {0}: {1}", pageBlob.Properties.Length, pageBlob.Uri);
}
else if (item.GetType() == typeof(CloudBlobDirectory))
{
CloudBlobDirectory directory = (CloudBlobDirectory)item;
Console.WriteLine("Directory: {0}", directory.Uri);
}
}
只显示在根容器的父文件夹和斑点。 我期待让他们所有的斑点,因为这是虚拟目录不实, ,比如我有这个文件
https://account.blob.core.windows.net/container/Accounts/Images/1/acc.jpg
,但它并不显示,它只是表明:
https://account.blob.core.windows.net/container/Accounts
和
https://account.blob.core.windows.net/container/anyfile
我是否必须请求父文件夹内的子文件夹才能到达文件?