Ejemplo n.º 1
0
  protected String[] listFileResources(URL dirURL, String schemaPath, FilenameFilter filter)
      throws URISyntaxException, IOException {
    String[] files;
    String[] tempFiles;
    List<String> filesList = new ArrayList<>();
    File dirFile = new File(dirURL.toURI());

    tempFiles = dirFile.list(filter);
    files = new String[tempFiles.length];

    for (String fileName : tempFiles) {
      filesList.add(schemaPath + "/" + fileName);
    }

    files = filesList.toArray(files);
    return files;
  }