bucket-rename-dir

Rename directories for Amazon S3 objects.

npm install bucket-rename-dir
1 downloads in the last day
9 downloads in the last week
31 downloads in the last month

bucket-rename-dir

Rename directories for Amazon S3 objects.

Install

NPM

Usage


var BucketRenameDir = require('bucket-rename-dir');
var renameDir = BucketRenameDir.connect({
  key: 's3-key',
  secret: 's3-secret'
  bucket: 'name-of-the-s3-bucket'
});


// Use as a stream or with callbacks

// Stream
renameDir('some/directory/path', 'some/NEW_directory/path').pipe(process.stdout);

// Callback
renameDir('some/directory/path', 'some/NEW_directory/path', function (err, affectedObjects) {
  // affectedObjects is an object containing key/value pairs
  // of original object name and new object name:

  // {
  //   'some/directory/path': 'some/NEW-directory/path'
  // }
});
npm loves you