且构网

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

如何在 azure blob 存储中创建空文件夹

更新时间:2023-02-14 21:05:43

从技术上讲,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.