예제 #1
0
  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>();
    }
  }
예제 #2
0
  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>();
    }
  }