@cysonius/sftp-utils
Advanced tools
Comparing version 0.0.6 to 0.0.7
26
index.js
@@ -103,2 +103,5 @@ const checkTypes=require('check-types'); | ||
let baseObj=this; | ||
if (!path)return callback({message:"No path specified",statusCode:400}); | ||
path=path.replace(/\\/g,'/'); | ||
baseObj.getSFtp(function(err,sftp) { | ||
@@ -136,2 +139,4 @@ if (err)return callback(err); | ||
let baseObj=this; | ||
if (!path)return callback({message:"No path specified",statusCode:400}); | ||
path=path.replace(/\\/g,'/'); | ||
baseObj.getSFtp(function(err,sftp) { | ||
@@ -148,2 +153,5 @@ if (err)return callback(err); | ||
let baseObj=this; | ||
if (!path)return callback({message:"No path specified",statusCode:400}); | ||
path=path.replace(/\\/g,'/'); | ||
baseObj.getSFtp(function(err,sftp) { | ||
@@ -184,2 +192,4 @@ if (err)return callback(err); | ||
let baseObj=this; | ||
if (!path)return callback({message:"No path specified",statusCode:400}); | ||
path=path.replace(/\\/g,'/'); | ||
baseObj.getSFtp(function(err,sftp) { | ||
@@ -195,2 +205,4 @@ if (err)return callback(err); | ||
let baseObj=this; | ||
if (!path)return callback({message:"No path specified",statusCode:400}); | ||
path=path.replace(/\\/g,'/'); | ||
baseObj.getSFtp(function(err,sftp) { | ||
@@ -233,2 +245,7 @@ if (err)return callback(err); | ||
let baseObj=this; | ||
if (!fromPath)return callback({message:"No from path specified",statusCode:400}); | ||
if (!toPath)return callback({message:"No to path specified",statusCode:400}); | ||
fromPath=fromPath.replace(/\\/g,'/'); | ||
toPath=toPath.replace(/\\/g,'/'); | ||
if (!options)options={}; | ||
@@ -243,2 +260,4 @@ baseObj.getSFtp(function(err,sftp) { | ||
if (options.overwrite){ | ||
@@ -261,2 +280,3 @@ baseObj.checkPathExists(toFile,function(err,exists){ | ||
toFile=toFile.replace(/\\/g,'/'); | ||
@@ -275,2 +295,4 @@ function rename(){ | ||
let baseObj=this; | ||
if (!path)return callback({message:"No path specified",statusCode:400}); | ||
path=path.replace(/\\/g,'/'); | ||
baseObj.getSFtp(function(err,sftp){ | ||
@@ -284,2 +306,4 @@ if (err)return callback(err); | ||
let baseObj=this; | ||
if (!path)return callback({message:"No path specified",statusCode:400}); | ||
path=path.replace(/\\/g,'/'); | ||
baseObj.getSFtp(function(err,sftp){ | ||
@@ -294,2 +318,4 @@ if (err)return callback(err); | ||
if (!options)options={}; | ||
if (!path)return callback({message:"No path specified",statusCode:400}); | ||
path=path.replace(/\\/g,'/'); | ||
@@ -296,0 +322,0 @@ if (options.overwrite){ |
{ | ||
"name": "@cysonius/sftp-utils", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "sftp utils", | ||
@@ -5,0 +5,0 @@ "author": { |
13492
304