VB.net code to Get Blob files

Posted by Rajnilari2015 under Azure category on | Points: 40 | Views : 1412
The below code will do so
Public Function GetBlobFiles(connectionString As String, containerName As String) As List(Of String)
Dim blobFiles = New List(Of String)()
Dim storageAccount As CloudStorageAccount = CloudStorageAccount.Parse(connectionString)
Dim blobclient As CloudBlobClient = storageAccount.CreateCloudBlobClient()
Dim blobcontainer As CloudBlobContainer = blobclient.GetContainerReference(containerName)
For Each item As IListBlobItem In blobcontainer.ListBlobs(Nothing, False)
If item.[GetType]() = GetType(CloudBlockBlob) Then
Dim blob As CloudBlockBlob = DirectCast(item, CloudBlockBlob)
End If
Return blobFiles
End Function

Comments or Responses

Login to post response