azure-blob-list-stream

2.0.0 • Public • Published

azure-blob-list-stream tests

Stream a list of all files from an Azure Blob Storage collection

Install

$ npm install --save azure-blob-list-stream

Usage

var ListStream = require('azure-blob-list-stream')
var 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.

API

ListStream(blob, container, token) -> Readable

Returns a readable stream that emits each Blob Storage file entry.

blob

Required
Type: object

An Azure Blob Storage interface that you construct.

container

Required
Type: string

The name of the storage container to list.

token

Type: string
Default: undefined

A page token at which to start the list operation.

stream.on('page', handler)

Listens on the page event which is emitted each time a new page of results arrives.

handler

Required
Type: function
Arguments: {token, count}

License

MIT © Ben Drucker

Readme

Keywords

Package Sidebar

Install

npm i azure-blob-list-stream

Weekly Downloads

68

Version

2.0.0

License

MIT

Unpacked Size

6.97 kB

Total Files

5

Last publish

Collaborators

  • bendrucker