Rename directories for Amazon S3 objects.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
index.js
package.json

README.md

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'
  // }
});