Reputation: 321
I want to list out all the directories, including EMPTY, of Azure Blob Storage Container. There are many ways to list the directories and I'm able to do it. Can anyone please tell me how to get empty directories too?
Upvotes: 1
Views: 2648
Reputation: 2457
There is no such thing as an empty directory on the blob service.
Directories on the blob service are virtual. When you create x/y/z we don't actually create a directory 'x' and a directory 'y' -- we create a blob with the name x/y/z. For conveniences sake we allow you to list with the delimiter '/' which returns x as though it were a directory. However, if you delete blob x/y/z and there were no other blobs with the prefix x/y, x and y would simply stop being listed as directories.
If you want a more directly parallel file system concept including support for empty directories, check out Azure Files.
Upvotes: 6