gpt4 book ai didi

azure - 在 WASB ListBlob 中使用通配符

转载 作者:行者123 更新时间:2023-12-03 01:02:41 25 4
gpt4 key购买 nike

我正在使用 Azure .Net SDK 列出 Windows Azure 存储 Blob 容器中的所有 Blob。

let client = account.CreateCloudBlobClient()
let container = client.GetContainerReference("my-container")
let list = container.ListBlobs("data/2014-*-17/", false) // ! here

如您所见,我正在尝试通过通配符前缀过滤 blob。

UPD 07/2019 不支持

最佳答案

不幸的是,这不起作用,因为 Azure 存储不允许您执行服务器端 wild card过滤。服务器端唯一可用的过滤选项是 prefix过滤。

因此,您要做的就是列出以 data/2014- 开头的 blob 名称然后在收到所有以 data/2014- 开头的 Blob 名称后,在客户端应用其余的过滤逻辑。 .

let list = container.ListBlobs("data/2014-", false) // ! here
//Do client side filtering on the "list"

关于azure - 在 WASB ListBlob 中使用通配符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57084862/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com