From dc2a0ca3e634de4d769c7b4e966b8df62bd2b91f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 20 Jun 2014 03:45:30 -0400 Subject: [PATCH] feature(flop) mv, cp -> move, copy --- lib/server/flop.js | 4 ++-- lib/server/rest.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/server/flop.js b/lib/server/flop.js index cce1e859..d4a086ba 100644 --- a/lib/server/flop.js +++ b/lib/server/flop.js @@ -113,7 +113,7 @@ }); }; - exports.mv = function(from, to, callback) { + exports.move = function(from, to, callback) { fs.rename(from, to, function(error) { var isExDev = error && error.code === 'EXDEV'; @@ -126,7 +126,7 @@ }); }; - exports.cp = function(from, to, type, callback) { + exports.copy = function(from, to, type, callback) { var options; if (!callback) { diff --git a/lib/server/rest.js b/lib/server/rest.js index 533e402f..41587eb1 100644 --- a/lib/server/rest.js +++ b/lib/server/rest.js @@ -283,7 +283,7 @@ else data = files; - copyFiles(files, flop.mv, function(error) { + copyFiles(files, flop.move, function(error) { if (error) sendError(params, error); else @@ -298,7 +298,7 @@ sendError(params, p.data); else { files.namesAll = Util.slice(files.names); - copyFiles(files, flop.cp, function(error) { + copyFiles(files, flop.copy, function(error) { if (error) sendError(params, error); else @@ -314,7 +314,7 @@ from = files.from; to = files.to || from + '.zip'; - flop.cp(from, to, 'zip', function(error) { + flop.copy(from, to, 'zip', function(error) { var name = path.basename(files.from); if (error) @@ -332,7 +332,7 @@ from = files.from; to = files.to || Util.rmStrOnce(files.from, ['.zip', '.gzip']); - flop.cp(from, to, 'unzip', function(error) { + flop.copy(from, to, 'unzip', function(error) { var name = path.basename(files.from); if (error)