I like the ListBlobsSegmented method that allows me to go through blobs in defined count chunks. However is it possible to get only those blobs that end up with ".xml" for example?
var blobList = cloudBlobContainer.ListBlobsSegmented(string.Empty,
false,
BlobListingDetails.None,
blobLimit,
continuationToken,
new BlobRequestOptions
{
LocationMode = LocationMode.PrimaryOnly
},
null);
this is the method I am using now after which I filter the out the xml blobs like this:
var xmlBlobs = blobList.Results.Where(b => Path.GetExtension(b.Uri.AbsolutePath).Equals(".xml", StringComparison.InvariantCultureIgnoreCase));
However this does not seem very effective to me. I wonder if there is a better way/more effective to this.
You are already using the most effective way, since ListBlobs API doesn't support filtering with suffix on the server side.