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
我是否必須請求父文件夾內的子文件夾才能到達文件?