exec(paths, options) {
    ls.self = this;
    paths = (paths !== null && !Array.isArray(paths) && (typeof paths === 'object')) ? paths.paths : paths;
    paths = paths || ['.'];
    paths = (Array.isArray(paths)) ? paths : [paths];
    paths = expand(paths);

    options = options || {};

    const preSortedPaths = ls.preSortPaths(paths);

    let dirResults = [];
    for (let i = 0; i < preSortedPaths.dirs.length; ++i) {
      if (options.recursive) {
        const result = ls.execDirRecursive(preSortedPaths.dirs[i], options);
        dirResults = dirResults.concat(result);
      } else {
        dirResults.push(ls.execDir(preSortedPaths.dirs[i], options));
      }
    }

    let stdout = '';
    if (preSortedPaths.files.length > 0) {
      stdout += ls.execLsOnFiles('.', preSortedPaths.files, options).results;
    }

    const dirOutput = ls.formatAll(dirResults, options, (dirResults.length + preSortedPaths.files.length > 1));
    stdout += (stdout && dirOutput) ? `\n\n${dirOutput}` : dirOutput;
    if (strip(stdout).trim() !== '') {
      ls.self.log(String(stdout).replace(/\\/g, '/'));
    }

    return 0;
  }
Main command execution.

@return {Object} { status, stdout }
@api public
@param paths
@param options