This selector selects files against a mapped set of target files, selecting all those files which are different.
Files with different lengths are deemed different automatically Files with identical timestamps are viewed as matching by default, unless you specify otherwise. Contents are compared if the lengths are the same and the timestamps are ignored or the same, except if you decide to ignore contents to gain speed.
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.
package |
phing |
---|
addConfigured(\FileNameMapper $fileNameMapper)
throws |
if more than one mapper defined |
---|---|
circularReference() : \BuildException
createMapper() : \a
throws |
if more than one mapper defined |
---|---|
\a
mapper to be configured
dieOnCircularReference( &$stk, \Project $p) : void
If one is included, throw a BuildException created by circularReference
This implementation is appropriate only for a DataType that cannot hold other DataTypes as children.
The general contract of this method is that it shouldn't do anything if checked is true and set it to true on exit.
throws |
---|
\Project
getCheckedRef( $requiredClass, $dataTypeName) : mixed
throws |
---|
mixed
getDescription()
retujrn |
string |
---|---|
getError() : string
string
the error condition
getProject() : \Project
isReference() : boolean
boolean
isSelected(\PhingFile $basedir, string $filename, \PhingFile $file) : boolean
throws |
---|
string
is the name of the file to check
boolean
whether the file should be selected or not
log(string $msg, integer $level = \Project::MSG_INFO) : void
string
The message to be logged.
integer
The message's priority at this message should have
noChildrenAllowed() : \BuildException
parsingComplete() : void
{@inheritdoc}
pushAndInvokeCircularReferenceCheck(\DataType $dt, &$stk, \Project $p)
selectionTest(\PhingFile $srcfile, \PhingFile $destfile) : true
true
if source file compares with destination file
setDescription(string $desc) : void
string
setError(string $msg) : void
string
The error message any BuildException should throw.
setIgnoreContents(boolean $ignoreContents)
boolean
if true ignore contents
setIgnoreFileTimes(boolean $ignoreFileTimes)
boolean
if true ignore file times
setProject(\Project $project) : void
setRefid(\Reference $r) : void
Subclasses may need to check whether any other attributes have been set as well or child elements have been created and thus override this method. if they do they must call parent::setRefid()
\Reference
setTargetdir(\PhingFile $targetdir)
tooManyAttributes() : \BuildException
validate()
throws | |
---|---|
verifySettings()
ignoreFileTimes : boolean
var |
---|
boolean
ignoreContents : boolean
var |
---|
boolean
errmsg : string
var |
---|
string
description : string
var |
---|
string
checked : boolean
Subclasses are responsible for setting this value to false if we'd need to investigate this condition (usually because a child element has been added that is a subclass of DataType).
var |
---|
boolean
project : \Project