I would like to fetch all the folder and files in a azure container in nodejs
I am using azure-storage library to get blob, but not able to find any example to list all the folder under a container. I am dumping (export) my anaylitics data to the storage container in auzure. Now i tried to read these files
My storage structure like
ios-analytics-full/ios_06cd82e4db0845b9bef73c5b22bea2fa/Event/2016-09-29/18/270b58c-04d7-4e5d-a503-cdce24a3940c_20160929_184723.blob
I want to read all folder created for each day and files under these folders
var containerName = "assist-ios-analytics-full";
blobService.listBlobsSegmented(containerName, null, {maxResults : 10}, function(err, result) {
if (err) {
console.log("Couldn't list blobs for container %s", containerName);
console.error(err);
} else {
console.log('Successfully listed blobs for container %s', containerName);
console.log(result.entries);
console.log(result.continuationToken);
res.json(result);
}
});
latest folder would be today date
ios-analytics-full/ios_06cd82e4db0845b9bef73c5b22bea2fa/Event/2017-05-31/18/270b58c-04d7-4e5d-a503-cdce24a3940c_20160929_184723.blob
/used as placeholders to simulate folders. Depending on the provider, you can request all files starting with a certain prefix, equivalent to asking for all files in a folder - Panagiotis Kanavosios-analytics-full/ios_06cd82e4db0845b9bef73c5b22bea2fa/Event/{date e.g. 2016-09-29}and see the list of all blobs there. Correct? - Gaurav Mantri