Search code examples
azure-storage

How to get a CloudBlobDirectory pointing toward the container root?


With the WindowsAzure.Storage library, I would like to create a CloudBlobDirectory that refers to the root of the container. The method CloudBlobContainer.GetDirectoryReference(string) unfortunately fails with an argument exception called with String.Empty as argument.

Is-it possible to have a CloudBlobDirectory referring to the root of the container?


Solution

  • In C# SDK, I was able to get it via:

    cloudBlobContainer.GetDirectoryReference(string.Empty)
    

    Nuget: Assembly Microsoft.WindowsAzure.Storage, Version=9.3.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35