String segment = patternSegments.get(segmentIndex);
if (segment.contains("**")) {
PatternSet patternSet = new PatternSet();
patternSet.include(includePattern);
patternSet.exclude(excludeSpec);
DirectoryFileTree fileTree = new DirectoryFileTree(baseDir, patternSet);
fileTree.visitFrom(visitor, file, new RelativePath(file.isFile(), relativePath.toArray(new String[relativePath.size()])));
} else if (segment.contains("*") || segment.contains("?")) {
PatternStep step = PatternStepFactory.getStep(segment, false);