private void maybeVisit(RelativePath path, boolean includeEmptyDirs, CopyActionProcessingStreamAction delegateAction) { if (path == null || path.getParent() == null || !visitedDirs.add(path)) { return; } maybeVisit(path.getParent(), includeEmptyDirs, delegateAction); List<FileCopyDetailsInternal> detailsForPath = pendingDirs.removeAll(path); FileCopyDetailsInternal dir; if (detailsForPath.isEmpty()) { // TODO - this is pretty nasty, look at avoiding using a time bomb stub here dir = new StubbedFileCopyDetails(path, includeEmptyDirs, chmod); } else { dir = detailsForPath.get(0); } delegateAction.processFile(dir); } });
public void visit(RelativePath path, Action<OutputStream> generator) { visitDirs(path.getParent(), visitor); visitor.visitFile(new FileVisitDetailsImpl(path, generator, stopFlag, chmod)); } }
context.put(e.getKey(), e.getValue()); context.put("project", getProject()); context.put("package", DefaultGroovyMethods.join(fvd.getRelativePath().getParent().getSegments(), ".")); context.put("class", fvd.getRelativePath().getLastName().replaceFirst("\\.java$", "")); FileReader reader = new FileReader(fvd.getFile());