packages/ls/dist/commands/ls.js
function error(path, e) {
    var status = void 0;
    var stdout = void 0;

    if (e.code === 'ENOENT' && e.syscall === 'scandir') {
      status = 1;
      stdout = 'ls: cannot access ' + path + ': No such file or directory';
    } else {
      status = 2;
      stdout = e.stack;
    }

    ls.self.log(stdout);
    return { status: status, stdout: stdout };
  }
function error(path, e) {
    var status = void 0;
    var stdout = void 0;

    if (e.code === 'ENOENT' && e.syscall === 'scandir') {
      status = 1;
      stdout = 'ls: cannot access ' + path + ': No such file or directory';
    } else {
      status = 2;
      stdout = e.stack;
    }

    ls.self.log(stdout);
    return { status: status, stdout: stdout };
  }
function error ( path , e ) { var status = void 0 ; var stdout = void 0 ; if ( e . code === 'ENOENT' && e . syscall === 'scandir' ) { status = 1 ; stdout = 'ls: cannot access ' + path + ': No such file or directory' ; } else { status = 2 ; stdout = e . stack ; } ls . self . log ( stdout ) ; return { status : status , stdout : stdout } ; }
Returns ls stderr and response codes
for errors.

@param {String} path
@param {Error} e
@param {String} e.code
@param {String} e.syscall
@param {String} e.stack
@api private
Returns ls stderr and response codes for errors .