mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 08:54:10 +00:00
refactored
This commit is contained in:
parent
7673b7d32d
commit
5c6fcfddcc
4 changed files with 73 additions and 102 deletions
|
|
@ -49,7 +49,7 @@
|
|||
fs.stat(lPath, function(pError, pStat){
|
||||
if(!pError)
|
||||
if(pStat.isDirectory())
|
||||
fs.readdir(lPath, call(readDir, pParams) );
|
||||
fs.readdir(lPath, Util.call(readDir, pParams) );
|
||||
else
|
||||
main.sendFile({
|
||||
name : lPath,
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
stats : lStats,
|
||||
};
|
||||
|
||||
fs.stat( lName, call(getFilesStat, lParams) );
|
||||
fs.stat( lName, Util.call(getFilesStat, lParams) );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -227,7 +227,7 @@
|
|||
lList = '<ul id=left class=panel>' + lPanel + '</ul>' +
|
||||
'<ul id=right class=panel>' + lPanel + '</ul>';
|
||||
|
||||
fs.readFile(INDEX, call(readFile, {
|
||||
fs.readFile(INDEX, Util.call(readFile, {
|
||||
list : lList,
|
||||
request : lReq,
|
||||
response : lRes
|
||||
|
|
@ -360,18 +360,6 @@
|
|||
return lRet;
|
||||
}
|
||||
|
||||
function call(pFunc, pParams){
|
||||
var lFunc = function(pError, pData){
|
||||
Util.exec(pFunc, {
|
||||
error : pError,
|
||||
data : pData,
|
||||
params : pParams
|
||||
});
|
||||
};
|
||||
|
||||
return lFunc;
|
||||
}
|
||||
|
||||
function noJS(pReq){
|
||||
var lNoJS, lPath;
|
||||
|
||||
|
|
@ -432,7 +420,7 @@
|
|||
},
|
||||
|
||||
function(pCallBack){
|
||||
zlib.gzip (p.data, call(gzipData, {
|
||||
zlib.gzip (p.data, Util.call(gzipData, {
|
||||
callback : pCallBack
|
||||
}));
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue