mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
feature(readify) commander.getDirContent -> readify
This commit is contained in:
parent
e8e730058d
commit
a4666d3978
3 changed files with 5 additions and 4 deletions
|
|
@ -218,6 +218,7 @@
|
|||
|
||||
error = Util.exec.tryLog(function() {
|
||||
cmd = spawn(сommand, args, options);
|
||||
//cmd = exec(сommand, options);
|
||||
});
|
||||
|
||||
if (error) {
|
||||
|
|
@ -241,7 +242,7 @@
|
|||
sendError(errorStr);
|
||||
});
|
||||
|
||||
cmd.on('close', function () {
|
||||
cmd.on('close', function() {
|
||||
cmd = null;
|
||||
|
||||
if (!isSended)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
Util = require(DIR + '../util'),
|
||||
|
||||
size = require(DIR + 'size'),
|
||||
commander = require(DIR + 'commander'),
|
||||
readify = require(DIR + 'readify'),
|
||||
time = require(DIR + 'timem'),
|
||||
pipe = require(DIR + 'pipe'),
|
||||
ncp = require(DIR + 'ncp'),
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
break;
|
||||
|
||||
default:
|
||||
commander.getDirContent(path, callback);
|
||||
readify(path, callback);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
WIN32 = process.platform === 'win32';
|
||||
|
||||
exports.getDirContent = function(path, callback) {
|
||||
module.exports = function(path, callback) {
|
||||
Util.checkArgs(arguments, ['path', 'callback'])
|
||||
.checkType('path', path, 'string')
|
||||
.checkType('callback', callback, 'function');
|
||||
Loading…
Add table
Add a link
Reference in a new issue