public CopySpecImpl into(Object destPath, Closure configureClosure) { if (configureClosure == null) { into(destPath); return this; } else { CopySpecImpl child = addChild(); child.into(destPath); ConfigureUtil.configure(configureClosure, child); return child; } }
public CopySpec from(Object sourcePath, Closure c) { if (c == null) { from(sourcePath); return this; } else { CopySpecImpl child = addChild(); child.from(sourcePath); ConfigureUtil.configure(c, child); return child; } }
public List<Spec<FileTreeElement>> getAllExcludeSpecs() { List<Spec<FileTreeElement>> result = new ArrayList<Spec<FileTreeElement>>(); if (parentSpec != null) { result.addAll(parentSpec.getAllExcludeSpecs()); } result.addAll(patternSet.getExcludeSpecs()); return result; }
public List<String> getAllExcludes() { List<String> result = new ArrayList<String>(); if (parentSpec != null) { result.addAll(parentSpec.getAllExcludes()); } result.addAll(getExcludes()); return result; }
public boolean isCaseSensitive() { if (caseSensitive != null) { return caseSensitive; } else if (parentSpec != null) { return parentSpec.isCaseSensitive(); } return true; }
public int getFileMode() { if (fileMode != null) { return fileMode; } if (parentSpec != null) { return parentSpec.getFileMode(); } return UnixStat.DEFAULT_FILE_PERM; }
public int getDirMode() { if (dirMode != null) { return dirMode; } if (parentSpec != null) { return parentSpec.getDirMode(); } return UnixStat.DEFAULT_DIR_PERM; }
public List<Action<? super FileCopyDetails>> getAllCopyActions() { if (parentSpec == null) { return actions; } List<Action<? super FileCopyDetails>> allActions = new ArrayList<Action<? super FileCopyDetails>>(); allActions.addAll(parentSpec.getAllCopyActions()); allActions.addAll(actions); return allActions; }
public RelativePath getDestPath() { RelativePath parentPath; if (parentSpec == null) { parentPath = new RelativePath(false); } else { parentPath = parentSpec.getDestPath(); } if (destDir == null) { return parentPath; } String path = destDir.toString(); if (path.startsWith("/") || path.startsWith(File.separator)) { return RelativePath.parse(false, path); } return RelativePath.parse(false, parentPath, path); }