public Set getResourcePaths(String path) { return _getResourcePaths(path, true); }
public Context build() { try { Thread.currentThread().setContextClassLoader(Utils.createURLClassLoader(basePath)); } catch (IOException e) { logger.warn("", e); } return new Context(this); }
public Context build() { try { Thread.currentThread().setContextClassLoader(Utils.createURLClassLoader(basePath)); } catch (IOException e) { logger.warn("", e); } return new Context(this); }
public Set getResourcePaths(String path) { return _getResourcePaths(path, true); }
private Set _getResourcePaths(String path, boolean resolve) { File a; if (resolve) { a = new File(b.basePath + path); } else { a = new File(path); } File[] files = a.listFiles(); Set<String> s = new HashSet<String>(); try { if (files != null) { for (File f : files) { if (f.isDirectory()) { Set inner = _getResourcePaths(f.getAbsolutePath(), false); s.addAll(inner); } else { s.add(f.getCanonicalPath().substring(b.basePath.length())); } } } } catch (IOException e) { logger.trace("", e); } return s; }
private Set _getResourcePaths(String path, boolean resolve) { File a; if (resolve) { a = new File(b.basePath + path); } else { a = new File(path); } File[] files = a.listFiles(); Set<String> s = new HashSet<String>(); try { if (files != null) { for (File f : files) { if (f.isDirectory()) { Set inner = _getResourcePaths(f.getAbsolutePath(), false); s.addAll(inner); } else { s.add(f.getCanonicalPath().substring(b.basePath.length())); } } } } catch (IOException e) { logger.trace("", e); } return s; }