net.sf.antcontrib.logic
public class TimestampSelector extends Task
Usage: Task declaration in the project:<taskdef name="latesttimestamp" classname="net.sf.antcontrib.logic.TimestampSelector" />
Call Syntax:<timestampselector [property="prop" | outputsetref="id"] [count="num"] [age="eldest|youngest"] [pathSep=","] [pathref="ref"] > <path> ... </path> </latesttimestamp>
Attributes: outputsetref --> The reference of the output Path set which will contain the files with the latest timestamps. property --> The name of the property to set with file having the latest timestamp. If you specify the "count" attribute, you will get the lastest N files. These will be the absolute pathnames count --> How many of the latest files do you wish to find pathSep --> What to use as the path separator when using the "property" attribute, in conjunction with the "count" attribute pathref --> The reference of the path which is the input set of files.
Constructor Summary | |
---|---|
TimestampSelector()
Default Constructor |
Method Summary | |
---|---|
protected int | compare(File a, File b) |
Path | createPath() |
void | doFileSetExecute(String[] paths) |
void | execute() |
protected int | partition(Vector array, int start, int end) |
void | setAge(String age) |
void | setCount(int count) |
void | setOutputSetId(String outputSetId) |
void | setPathRef(Reference ref) |
void | setPathSep(char pathSep) |
void | setProperty(String property) |
void | sort(Vector array) |
protected void | sort(Vector array, int start, int end) |
protected void | swap(Vector array, int i, int j) |