}
public WorkResult execute(final CopyActionProcessingStream stream) {
final Set<RelativePath> visited = new HashSet<RelativePath>();
WorkResult didWork = delegate.execute(new CopyActionProcessingStream() {
public void process(final CopyActionProcessingStreamAction action) {
stream.process(new CopyActionProcessingStreamAction() {
public void processFile(FileCopyDetailsInternal details) {
visited.add(details.getRelativePath());
action.processFile(details);
}
});
}
});
SyncCopyActionDecoratorFileVisitor fileVisitor = new SyncCopyActionDecoratorFileVisitor(visited);
MinimalFileTree walker = new DirectoryFileTree(baseDestDir).postfix();
walker.visit(fileVisitor);
visited.clear();
return new SimpleWorkResult(didWork.getDidWork() || fileVisitor.didWork);
}