org.apache.tools.ant.taskdefs
Class UpToDate
- Condition
Sets the given property if the specified target has a timestamp
greater than all of the source files.
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).
|
execute , getDescription , getLocation , getOwningTarget , getRuntimeConfigurableWrapper , getTaskName , getTaskType , getWrapper , handleErrorFlush , handleErrorOutput , handleFlush , handleInput , handleOutput , init , isInvalid , log , log , maybeConfigure , perform , reconfigure , setDescription , setLocation , setOwningTarget , setRuntimeConfigurableWrapper , setTaskName , setTaskType |
mapperElement
protected Mapper mapperElement
add
public void add(FileNameMapper fileNameMapper)
A nested filenamemapper
fileNameMapper
- the mapper to add
addSrcfiles
public void addSrcfiles(FileSet fs)
Nested <srcfiles> element.
createMapper
public Mapper createMapper()
throws BuildException
Defines the FileNameMapper to use (nested mapper element).
- a mapper to be configured
eval
public boolean eval()
Evaluate (all) target and source file(s) to
see if the target(s) is/are up-to-date.
- eval in interface Condition
- true if the target(s) is/are up-to-date
execute
public void execute()
throws BuildException
Sets property to true if target file(s) have a more recent timestamp
than (each of) the corresponding source file(s).
- execute in interface Task
scanDir
protected boolean scanDir(File srcDir,
String[] files)
Scan a directory for files to check for "up to date"ness
srcDir
- the directoryfiles
- the files to scan for
- true if the files are up to date
setProperty
public void setProperty(String property)
The property to set if the target file is more up-to-date than
(each of) the source file(s).
property
- the name of the property to set if Target is up-to-date.
setSrcfile
public void setSrcfile(File file)
The file that must be older than the target file
if the property is to be set.
file
- the file we are checking against the target file.
setTargetFile
public 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.
file
- the file we are checking against.
setValue
public 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). Defaults to 'true'.
value
- the value to set the property to if Target is up-to-date
Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.