public class DifferentSelector extends MappingSelector
This is a useful selector to work with programs and tasks that don't handle dependency checking properly; Even if a predecessor task always creates its output files, followup tasks can be driven off copies made with a different selector, so their dependencies are driven on the absolute state of the files, not a timestamp.
Clearly, however, bulk file comparisons is inefficient; anything that can use timestamps is to be preferred. If this selector must be used, use it over as few files as possible, perhaps following it with an <uptodate> to keep the descendant routines conditional.
granularity, map, mapperElement, targetdir
description, location, project
Constructor and Description |
---|
DifferentSelector() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
selectionTest(java.io.File srcfile,
java.io.File destfile)
this test is our selection test that compared the file with the destfile
|
void |
setIgnoreContents(boolean ignoreContents)
This flag tells the selector to ignore contents
|
void |
setIgnoreFileTimes(boolean ignoreFileTimes)
This flag tells the selector to ignore file times in the comparison
|
addConfigured, createMapper, isSelected, setGranularity, setTargetdir, verifySettings
getError, setError, setError, validate
checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, setRefid, tooManyAttributes, toString
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
public void setIgnoreFileTimes(boolean ignoreFileTimes)
ignoreFileTimes
- if true ignore file timespublic void setIgnoreContents(boolean ignoreContents)
ignoreContents
- if true ignore contentsprotected boolean selectionTest(java.io.File srcfile, java.io.File destfile)
selectionTest
in class MappingSelector
srcfile
- the source filedestfile
- the destination file