Skip to content
Get a file list from an Amazon S3 bucket.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore Prepare for npm publish. Apr 12, 2013
README.md
index.js
package.json

README.md

Bucket List

Get a file list from an Amazon S3 bucket.

Supports streams and callbacks.

Install

npm install bucket-list

Usage

var BucketList = require('bucket-list');
var bucket = BucketList.connect({
  key: 's3-key',
  secret: 's3-secret'
  bucket: 'name-of-the-s3-bucket'
});


// Stream bucket files

var bucketStream = bucket('folder_name');

bucketStream.on('data', function (fileNameWithPath) {
  console.log(fileNameWithPath);
});


// Callback style with bucket files

bucket('folder_name', function (err, files) {
  console.log(files);
});
Something went wrong with that request. Please try again.