且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Azure Blob存储中创建空文件夹

更新时间:2023-02-14 20:52:38

从技术上讲,Azure Blob存储中不能有空文件夹,因为Blob存储具有2级层次结构-Blob容器和Blob.实际上,您可以通过在文件名前添加所需的文件夹名来创建文件夹的错觉,例如假设您想要说css文件夹中的样式表(例如site.css),则将样式表文件命名为css/site.css.

Technically speaking, you can't have an empty folder in Azure Blob Storage as blob storage has a 2 level hierarchy - blob container and blob. You essentially create an illusion of a folder by prefixing the file name with the folder name you like e.g. assuming you want a style sheet (say site.css) in say css folder, you name the stylesheet file as css/site.css.

某些工具要做的是创建一个空文件夹,它们创建一个零字节的blob,并以该文件夹的名称为前缀,然后不显示该零字节的blob.如果需要,您可以这样做.

What some of the tools do is in order to create an empty folder, they create a zero byte blob and prefix it with the name of the folder and then don't show that zero byte blob. If you want, you can do that.