Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

s3fs

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

s3fs - npm Package Compare versions

Comparing version 2.4.8 to 2.5.0

14

lib/s3fs.js

@@ -334,13 +334,21 @@ 'use strict';

* @param destinationFile `String`. **Required**. Relative path to the destination file
* @param options `Object`. _Optional_. The options to be used when copying the file. See [AWS SDK](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#copyObject-property)
* @param callback `Function`. _Optional_. Callback to be used, if not provided will return a Promise
* @returns {Promise|*} Returns a `Promise` if a callback is not provided
*/
S3fs.prototype.copyFile = function (sourceFile, destinationFile, callback) {
S3fs.prototype.copyFile = function (sourceFile, destinationFile, options, callback) {
var self = this;
var promise = new Promise(function (resolve, reject) {
self.s3.copyObject({
if (typeof options === 'function') {
callback = options;
options = undefined;
}
options = options || {};
self.s3.copyObject(extend(true, options, {
Bucket: self.bucket,
Key: s3Utils.toKey(s3Utils.joinPaths(self.path + s3Utils.toKey(destinationFile))),
CopySource: [self.bucket, s3Utils.toKey(s3Utils.joinPaths(self.path + s3Utils.toKey(sourceFile)))].join('/')
}, function (err, data) {
}), function (err, data) {
if (err) {

@@ -347,0 +355,0 @@ return reject(err);

{
"name": "s3fs",
"version": "2.4.8",
"version": "2.5.0",
"dependencies": {
"aws-sdk": {
"version": "2.4.7",
"from": "aws-sdk@>=2.4.7 <2.5.0",
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.4.7.tgz"
"version": "2.5.2",
"from": "aws-sdk@>=2.5.2 <2.6.0",
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.5.2.tgz"
},

@@ -10,0 +10,0 @@ "bluebird": {

{
"name": "s3fs",
"version": "2.4.8",
"version": "2.5.0",
"description": "Implementation of Node.JS FS interface using Amazon Simple Storage Service (S3).",

@@ -37,3 +37,3 @@ "keywords": [

"dependencies": {
"aws-sdk": "~2.4.7",
"aws-sdk": "~2.5.2",
"bluebird": "~3.4.1",

@@ -47,7 +47,7 @@ "extend": "~3.x"

"dirty-chai": "~1.2.2",
"eslint": "~3.0.1",
"istanbul": "~0.4.4",
"eslint": "~3.3.1",
"istanbul": "~0.4.5",
"jscs": "~3.0.7",
"jsinspect": "~0.x",
"mocha": "~2.5.3",
"mocha": "~3.0.2",
"nsp": "~2.6.1",

@@ -54,0 +54,0 @@ "through2": "~2.x"

@@ -144,3 +144,3 @@ # S3FS

### s3fs.copyFile(sourcePath, destinationPath[, callback])
### s3fs.copyFile(sourcePath, destinationPath[, options, callback])
Allows a file to be copied from one path to another path within the same bucket. Paths are relative to

@@ -151,2 +151,3 @@ the bucket originally provided.

* destinationFile `String`. **Required**. Relative path to the destination file
* options `Object`. _Optional_. The options to be used when copying the file. See [AWS SDK](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#copyObject-property)
* callback `Function`. _Optional_. Callback to be used, if not provided will return a Promise

@@ -153,0 +154,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc