mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactor(commander) readDir: files -> names
This commit is contained in:
parent
901f63a866
commit
5fbdf29515
1 changed files with 5 additions and 5 deletions
|
|
@ -39,7 +39,7 @@
|
|||
* @param pError
|
||||
* @param pFiles
|
||||
*/
|
||||
function readDir(params, error, files) {
|
||||
function readDir(params, error, names) {
|
||||
var n, stats, filesData, fill, fileParams,
|
||||
p = params,
|
||||
dirPath = format.addSlashToEnd(p.path);
|
||||
|
|
@ -48,11 +48,11 @@
|
|||
Util.exec(p.callback, error);
|
||||
else {
|
||||
/* Получаем информацию о файлах */
|
||||
n = files.length,
|
||||
n = names.length,
|
||||
stats = {},
|
||||
|
||||
filesData = {
|
||||
files : files,
|
||||
names : names,
|
||||
stats : stats,
|
||||
callback : p.callback,
|
||||
path : p.path
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
if (!n)
|
||||
fillJSON(filesData);
|
||||
else
|
||||
files.forEach(function(name) {
|
||||
names.forEach(function(name) {
|
||||
fileParams = {
|
||||
callback : fill,
|
||||
count : n,
|
||||
|
|
@ -146,7 +146,7 @@
|
|||
|
||||
Util.checkArgs(arguments, ['params']);
|
||||
|
||||
files = parseStats(p.files, p.stats);
|
||||
files = parseStats(p.names, p.stats);
|
||||
json.files = changeOrder(files);
|
||||
json.path = format.addSlashToEnd(p.path);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue