public List<String> getDirectory(String path) { try { File dir = new File(path); RecursiveDirLister d = new RecursiveDirLister(dir); return d.getFileListing(); } catch (Exception e) { // e.printStackTrace(); return new ArrayList<String>(); } }
public List<String> getPluginFiles(String pluginName) { try { File dir = Server.getPluginManager().getPlugin(pluginName).getDataFolder(); RecursiveDirLister d = new RecursiveDirLister(dir); return d.getFileListing(); } catch (Exception e) { // e.printStackTrace(); return new ArrayList<String>(); } }