waghekapil
waghekapil

Reputation: 321

List EMPTY directories in Windows Azure Blob storage container

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

Answers (1)

Emily Gerner
Emily Gerner

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

Related Questions