{"size": 314, "ext": "js", "max_stars_repo_path": "lib/adapters/directory-lister.js", "max_stars_repo_name": "ScriptBox99/vscode-remote-repo-viewer", "max_stars_repo_stars_event_min_datetime": "2020-03-09T17:13:57.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-08T09:14:57.000Z", "max_issues_repo_path": "lib/adapters/directory-lister.js", "max_issues_repo_name": "ScriptBox99/vscode-remote-repo-viewer", "max_issues_repo_issues_event_min_datetime": "2018-01-30T09:03:05.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-25T02:25:22.000Z", "max_forks_repo_path": "lib/adapters/directory-lister.js", "max_forks_repo_name": "ScriptBox99/vscode-remote-repo-viewer", "max_forks_repo_forks_event_min_datetime": "2019-05-12T13:11:22.000Z", "max_forks_repo_forks_event_max_datetime": "2021-05-07T07:32:28.000Z"}
{"max_stars_count": 5, "max_issues_count": 7, "max_forks_count": 2, "avg_line_length": 18.4705882353, "max_line_length": 56, "alphanum_fraction": 0.5828025478}
class DirectoryLister {
  constructor ({ fs }) {
    this._fs = fs
  }

  list (directoryPath) {
    return new Promise((resolve, reject) => {
      this._fs.readdir(directoryPath, (err, result) => {
        if (err) reject(err)
        else resolve(result)
      })
    })
  }
}

module.exports = DirectoryLister
