1

How can I list the contents of a folder in the Azure Blob Store?

I am able to list the contents of a container using the below method.

public void listBlobsInContainer()
    {
     // Loop over blobs within the container and output the URI to each of them.
        for (ListBlobItem blobItem : blobContainer.listBlobs()) {
           System.out.println(blobItem.getUri());
       }
    }

However, this only gives me the top level contents. I would like to get the contents of a folder inside one of the blobs listed above.

For my below Azure storage, say, the above method returns output as 6970b2a5-e220-4d68-8fc0-2992a1b8bdb7 and 83755a8a-b39a-4069-a64e-9c08fa8a39e5, which are the contents of the container called datafileuploads enter image description here

However, I would like to get the contents of the folder, 6970b2a5-e220-4d68-8fc0-2992a1b8bdb7

saltmangotree
  • 171
  • 4
  • 11

0 Answers0