feature(readify) commander.getDirContent -> readify

This commit is contained in:
coderaiser 2014-08-20 02:45:35 -04:00
parent e8e730058d
commit a4666d3978
3 changed files with 5 additions and 4 deletions

View file

@ -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)

View file

@ -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;
}
};

View file

@ -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');