org.apache.tools.ant.taskdefs
public class UpToDate extends Task implements Condition
Since: Ant 1.2
UNKNOWN: category="control"
Field Summary | |
---|---|
protected Mapper | mapperElement |
Method Summary | |
---|---|
void | add(FileNameMapper fileNameMapper)
A nested filenamemapper |
void | addSrcfiles(FileSet fs)
Nested <srcfiles> element. |
Mapper | createMapper()
Defines the FileNameMapper to use (nested mapper element). |
boolean | eval()
Evaluate (all) target and source file(s) to
see if the target(s) is/are up-to-date. |
void | execute()
Sets property to true if target file(s) have a more recent timestamp
than (each of) the corresponding source file(s). |
protected boolean | scanDir(File srcDir, String[] files)
Scan a directory for files to check for "up to date"ness |
void | setProperty(String property)
The property to set if the target file is more up-to-date than
(each of) the source file(s).
|
void | setSrcfile(File file)
The file that must be older than the target file
if the property is to be set.
|
void | setTargetFile(File file)
The file which must be more up-to-date than (each of) the source file(s)
if the property is to be set.
|
void | setValue(String value)
The value to set the named property to if the target file is more
up-to-date than (each of) the source file(s). |
Parameters: fileNameMapper the mapper to add
Since: Ant 1.6.3
Parameters: fs the source files
Returns: a mapper to be configured
Throws: BuildException if more than one mapper is defined
Returns: true if the target(s) is/are up-to-date
Throws: BuildException on error
Parameters: srcDir the directory files the files to scan for
Returns: true if the files are up to date
Parameters: property the name of the property to set if Target is up-to-date.
Parameters: file the file we are checking against the target file.
Parameters: file the file we are checking against.
Parameters: value the value to set the property to if Target is up-to-date