public Path[] getListInstalledPlugins() throws IOException { if (!Files.exists(environment.pluginsFile())) { return new Path[0]; } try (DirectoryStream<Path> stream = Files.newDirectoryStream(environment.pluginsFile())) { return Iterators.toArray(stream.iterator(), Path.class); } }