public boolean accept(File pathname) { if (Analyzer.doNotCopy.matcher(pathname.getName()).matches()) { return false; } if (pathname.isDirectory() && isRecursive()) { return true; } if (instruction == null) { return true; } return !instruction.isNegated() & instruction.matches(pathname.getName()); } }
private String doResourceDirectory(Jar jar, Map<String, String> extra, boolean preprocess, File sourceFile, String destinationPath) throws Exception { String filter = extra.get("filter:"); boolean flatten = isTrue(extra.get("flatten:")); boolean recursive = true; String directive = extra.get("recursive:"); if (directive != null) { recursive = isTrue(directive); } InstructionFilter iFilter = null; if (filter != null) { iFilter = new InstructionFilter(Instruction.getPattern(filter), recursive); } else { iFilter = new InstructionFilter(null, recursive); } Map<String, File> files = newMap(); resolveFiles(sourceFile, iFilter, recursive, destinationPath, files, flatten); for (Map.Entry<String, File> entry : files.entrySet()) { copy(jar, entry.getKey(), entry.getValue(), preprocess, extra); } return destinationPath; }
private String doResourceDirectory(Jar jar, Map<String, String> extra, boolean preprocess, File sourceFile, String destinationPath) throws Exception { String filter = extra.get("filter:"); boolean flatten = isTrue(extra.get("flatten:")); boolean recursive = true; String directive = extra.get("recursive:"); if (directive != null) { recursive = isTrue(directive); } InstructionFilter iFilter = null; if (filter != null) { iFilter = new InstructionFilter(Instruction.getPattern(filter), recursive, getDoNotCopy()); } else { iFilter = new InstructionFilter(null, recursive, getDoNotCopy()); } Map<String, File> files = newMap(); resolveFiles(sourceFile, iFilter, recursive, destinationPath, files, flatten); for (Map.Entry<String, File> entry : files.entrySet()) { copy(jar, entry.getKey(), entry.getValue(), preprocess, extra); } return destinationPath; }
public boolean accept(File pathname) { if (doNotCopy != null && doNotCopy.matcher(pathname.getName()).matches()) { return false; } if (pathname.isDirectory() && isRecursive()) { return true; } if (instruction == null) { return true; } return !instruction.isNegated() == instruction.matches(pathname.getName()); } }