我想要容器中 Azure Blob 文件中的所有名称(出于特定目的)。我发现了一些类似的问题,甚至在 stackoverflow.com ( getting list of names of Azure blob files in a container? ) 上都有一个。但所有这些答案都首先使用 ListBlobs() 方法。这就是我想要防止的,因为有 24,000 个文件,大约需要 10 分钟才能将所有文件存储在列表中并从每个文件接收名称。我现在在 C# 中使用的方法:
var container = GetOrCreateBlobContainer(containerName);
var blobs = container.ListBlobs(useFlatBlobListing: true);
var blobNames = blobs.OfType<CloudBlockBlob>().Select(b => b.Name).ToList();
return blobNames;
我想要的:直接从存储中获取所有名称,而不先使用container.ListBlobs()。
这可能吗?
最佳答案
What I want: Get all names directly from the storage without using container.ListBlobs() first.
Is this possible??
不,这是不可能的。您需要调用 ListBlobs
来获取容器中所有 Blob 的列表。
关于c# - 仅获取容器中 Azure blob 文件的所有名称?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42647954/