public T findOpt(String include) throws IOException { List<T> found; found = find(include); switch (found.size()) { case 0: return null; case 1: return found.get(0); default: throw new IOException(toString() + ": ambiguous: " + include); } }
public void paths(Node<?> dir, Filter filter, List<String> result) throws IOException { String path; for (Node<?> node : dir.find(filter)) { path = node.getRelative(dir); if (!result.contains(path)) { result.add(path); } } }
/** uses default excludes */ public List<T> find(String... includes) throws IOException { return find(getWorld().filter().include(includes)); }
public void addAll(Node<?> file) throws IOException { Node<?> dir; file.checkExists(); dir = getDir(file); for (Node<?> node : dir.find("**/*.class")) { add(Input.load(node)); } }
out.closeEntry(); content = (List) data.find("**/*"); files = new ArrayList<>();