gpt4 book ai didi

azure - 检查 azure blob 容器中是否存在文件

转载 作者:行者123 更新时间:2023-12-02 08:29:45 27 4
gpt4 key购买 nike

我有一个 azure 的 blob 容器名称“x”,我想检查该 blob 中是否存在文件名“a.jpg”,并根据该值返回 true 或 false。看起来很简单,但是当我谷歌时没有明确的答案。

最佳答案

文档中明确提到,如果你使用c#可以使用ExistsAsync方法

public async Task<bool> FileExists(string fileName)
{
return await directory.GetBlockBlobReference(fileName).ExistsAsync();
}

关于azure - 检查 azure blob 容器中是否存在文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62141300/

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