Cloud Storage Integrator 2016 Node.js Edition
Cloud Storage Integrator 2016 Node.js Edition
Questions / Feedback?

PrefixList Event

Fired for each blob prefix returned when BlobDelimiter is set and ListBlobs is called..

Syntax

azureblob.on('PrefixList', [callback])

Callback

The 'callback' is called when the 'PrefixList' event is emited.

function(e){ }

The argument 'e' has the following properties:

e.prefix
e.otherData

Remarks

BlobDelimiter must be set in order for this event to fire. The PrefixList event will fire for each BlobPrefix element returned. Each BlobPrefix can then be used to traverse the virtual namespace hierarchy, by setting Prefix and calling ListBlobs.

Note, the Azure Blob Storage does not support hierarchical structures. However blob names can be used to simulate a virtual hierarchical folder structure.

For example, we have blobs with the following names:

MyCompany, MyCompany/Department1, MyCompany/Department2

If we set BlobDelimiter to "/", calling ListBlobs, will return the "MyCompany" blob. The PrefixList event will also fire for "MyCompany/".

If you then wanted to traverse the blobs contained within the "MyCompany/" virtual folder, you can set Prefix to "MyCompany/" and call ListBlobs. The resulting blob list will contain the "MyCompany/Department1" and "MyCompany/Department2" blobs.

 
 
Copyright (c) 2019 /n software inc. - All rights reserved.
Cloud Storage Integrator 2016 Node.js Edition - Version 16.0 [Build 7239]