packages/ls/dist/commands/ls.js
function execDir(path, options) {
    var rawFiles = [];

    function pushFile(file, data) {
      rawFiles.push({
        file: file,
        data: data
      });
    }

    // Add in implied current and parent dirs.
    pushFile('.', fs.statSync('.'));
    pushFile('..', fs.statSync('..'));

    // Walk the passed in directory,
    // pushing the results into `rawFiles`.
    walkDir(path, pushFile, ls.error);

    var o = ls.execLsOnFiles(path, rawFiles, options);
    o.path = path;
    return o;
  }
function execDir(path, options) {
    var rawFiles = [];

    function pushFile(file, data) {
      rawFiles.push({
        file: file,
        data: data
      });
    }

    // Add in implied current and parent dirs.
    pushFile('.', fs.statSync('.'));
    pushFile('..', fs.statSync('..'));

    // Walk the passed in directory,
    // pushing the results into `rawFiles`.
    walkDir(path, pushFile, ls.error);

    var o = ls.execLsOnFiles(path, rawFiles, options);
    o.path = path;
    return o;
  }
function execDir ( path , options ) { var rawFiles = [ ] ; function pushFile ( file , data ) { rawFiles . push ( { file : file , data : data } ) ; } // Add in implied current and parent dirs. pushFile ( '.' , fs . statSync ( '.' ) ) ; pushFile ( '..' , fs . statSync ( '..' ) ) ; // Walk the passed in directory, // pushing the results into `rawFiles`. walkDir ( path , pushFile , ls . error ) ; var o = ls . execLsOnFiles ( path , rawFiles , options ) ; o . path = path ; return o ; }
Executes `ls` functionality
for a given directory.

@param {String} path
@param {Object} options
@return {{path: String, size: *, results: *}} results
@api private
Executes ls functionality for a given directory .