private void blossomDirectory(File dir) throws IOException { // System.out.println(">> blossomDirectory() on " + dir.getPath()); String canonicalPath = dir.getCanonicalPath(); String[] listing = (filter == null ? dir.list() : dir.list(filter)); for (int i = listing.length; --i >= 0; ) { // System.out.println(">> listing: " + listing[i]); if (filter == null || filter.accept(dir, listing[i])) { String name = (canonical ? canonicalPath : dir.getPath()) + File.separator + listing[i]; File file = new File(name); // System.out.println(">> parent: " + dir.getName()); // System.out.println(">> created file: " + file.getPath()); if (file.isFile()) files.push(file); else // dir { if (!markedDirex.containsKey(file.getCanonicalPath())) direx.push(file); } } } markedDirex.put(canonicalPath, dummy); }