private def listDir()

in src/main/scala/com/googlesource/gerrit/plugins/support/commands/PluginsInfoCommand.scala [47:58]


  private def listDir(dir: String): CommandResult = {
    val jsonArray = new JsonArray()
    sitePathsWrapper
      .getAsPath(dir)
      .toFile
      .listFiles
      .map(FileAttribute.from)
      .map(gson.toJsonTree)
      .foreach(jsonArray.add)

    CommandResult(dir, JsonResult(jsonArray))
  }