mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 09:24:51 +00:00
feature(flop) delete, move: add checkArgs
This commit is contained in:
parent
83e90dc75c
commit
1452488945
1 changed files with 4 additions and 0 deletions
|
|
@ -58,6 +58,8 @@
|
|||
};
|
||||
|
||||
exports.delete = function(path, callback) {
|
||||
Util.checkArgs(arguments, ['path', 'callback']);
|
||||
|
||||
if (rimraf)
|
||||
rimraf(path, callback);
|
||||
else
|
||||
|
|
@ -72,6 +74,8 @@
|
|||
};
|
||||
|
||||
exports.move = function(from, to, callback) {
|
||||
Util.checkArgs(arguments, ['path', 'to', 'callback']);
|
||||
|
||||
fs.rename(from, to, function(error) {
|
||||
var isExDev = error && error.code === 'EXDEV';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue