Skip to content

Instantly share code, notes, and snippets.

View justcla's full-sized avatar

Justin Clareburt justcla

View GitHub Profile
@justcla
justcla / StorageHelper.cs
Created February 8, 2018 23:28
Helper class (C#) returns a list of filenames for all files in a given blob container (Azure Storage)
public async Task<List<string>> GetBlobFileListAsync(string storageConnectionString, string containerName)
{
try
{
// Get Reference to Blob Container
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(storageConnectionString);
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
CloudBlobContainer container = blobClient.GetContainerReference(containerName);
// Fetch info about files in the container