I have an azure container with directories named by date (eg 20201203 contains all the files created on December 23 2020). The files in the directory are named like this : {filename}{format}{extension} For exemple in directory 20201203 I have these 3 files :
- file1_300_300.png
- file1_150_150.png
- file2_300_300.png
I want to get all the blobs specific to a file name (so all the files with the different formats).
The method ListBlobs() of a CloudBlobContainer object can take a string argument that filters the blobs.
The problem is that in my case, I have a CloudBlobDirectory object and not a CloudBlobContainer. The ListBlobs() method of a CloudBlobDirectory object does not have an overload with a simple string parameter to be used as a prefix filter to get specific blobs.
I could of course retrieve all the blobs of the directory with var blobs = myAzureDirectory.ListBlobs() and then check for each blob if its name start with the name I'm looking for. But this would have poor performances as I have a lot of files in each directories and a lot of Directories to treat.
Is there a good way to do that ? Thanks!
