Stream a list of all files from an Azure Blob Storage collection
$ npm install --save azure-blob-list-stream
const ListStream = require('azure-blob-list-stream')
const blob = azure.createBlobService(process.env.AZURE_STORAGE_CONNECTION_STRING)
ListStream(blob, 'my-container')
.on('data', (blob) => console.log(blob.name))
The stream respects backpressure and will only read in new pages from Azure when its internal buffer is empty.
Returns a readable stream that emits each Blob Storage file entry.
Required
Type: object
An Azure Blob Storage interface that you construct.
Required
Type: string
The name of the storage container to list.
Type: string
Default: undefined
A page token at which to start the list operation.
Listens on the page
event which is emitted each time a new page of results arrives.
Required
Type: function
Arguments: {token, count}
MIT © Ben Drucker