mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactor(rest) copy -> fse
This commit is contained in:
parent
ba0fcadb6e
commit
e78b38c4dc
1 changed files with 9 additions and 7 deletions
|
|
@ -36,12 +36,14 @@
|
|||
|
||||
NOT_LOG = true,
|
||||
|
||||
copy = main.srvrequire('ncp') || function(from, to, callback) {
|
||||
pipe.create({
|
||||
from : from,
|
||||
to : to,
|
||||
callback : callback
|
||||
});
|
||||
fse = {
|
||||
copy: main.srvrequire('ncp') || function(from, to, callback) {
|
||||
pipe.create({
|
||||
from : from,
|
||||
to : to,
|
||||
callback : callback
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -277,7 +279,7 @@
|
|||
if (!Util.checkObjTrue(lFiles, ['from', 'to']))
|
||||
sendError(pParams, p.data);
|
||||
else
|
||||
copy(lFiles.from, lFiles.to, function(error) {
|
||||
fse.copy(lFiles.from, lFiles.to, function(error) {
|
||||
if (error)
|
||||
sendError(pParams, error);
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue