public String[] getAllDocumentPaths() { String[] paths; try { List<String> documentPaths = matchDocumentPaths("/**/*"); paths = documentPaths.toArray(new String[documentPaths.size()]); } catch (IOException e) { // Note: Ignore: no documents found paths = new String[0]; } return paths; }
public String[] getAllDocumentPaths() { String[] paths; try { List<String> documentPaths = matchDocumentPaths("/**/*"); paths = documentPaths.toArray(new String[documentPaths.size()]); } catch (IOException e) { // Note: Ignore: no documents found paths = new String[0]; } return paths; }
public String[] getDocumentPaths(String path, boolean includeSubPaths, String documentPattern) throws IOException { if ((path == null) || (path.length() == 0)) { path = "/"; } if (!path.startsWith("/")) { path = "/" + path; } if (!path.endsWith("/")) { path = path + "/"; } if ((documentPattern == null) || (documentPattern.length() == 0)) { documentPattern = "*"; } // classpath*: final StringBuilder pattern = new StringBuilder(128); pattern.append(path) .append((includeSubPaths ? "**/" : "")) .append(documentPattern); List<String> documentPaths = matchDocumentPaths(pattern.toString()); return documentPaths.toArray(new String[documentPaths.size()]); }
public String[] getDocumentPaths(String path, boolean includeSubPaths, String documentPattern) throws IOException { if ((path == null) || (path.length() == 0)) { path = "/"; } if (!path.startsWith("/")) { path = "/" + path; } if (!path.endsWith("/")) { path = path + "/"; } if ((documentPattern == null) || (documentPattern.length() == 0)) { documentPattern = "*"; } // classpath*: final StringBuilder pattern = new StringBuilder(128); pattern.append(path) .append((includeSubPaths ? "**/" : "")) .append(documentPattern); List<String> documentPaths = matchDocumentPaths(pattern.toString()); return documentPaths.toArray(new String[documentPaths.size()]); }