mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(commander) getDirContent: add checkType
This commit is contained in:
parent
0a354c9dfb
commit
02eeba121e
1 changed files with 3 additions and 1 deletions
|
|
@ -22,7 +22,9 @@
|
|||
WIN32 = process.platform === 'win32';
|
||||
|
||||
exports.getDirContent = function(path, callback) {
|
||||
Util.checkArgs(arguments, ['path', 'callback']);
|
||||
Util.checkArgs(arguments, ['path', 'callback'])
|
||||
.checkType('path', path, 'string')
|
||||
.checkType('callback', callback, 'function');
|
||||
|
||||
fs.readdir(path, function(error, names) {
|
||||
if (error)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue