Debian Codegraph @

docs/manual/tasks/timestampselector.html

raw symbols SCIP
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <title>Ant-contrib Tasks: TimestampSelector</title>
5 </head>
6
7 <body>
8 <h1>TimestampSelector</h1>
9
10 <p>The TimestampSelector task takes either a nested &lt;path&gt; element,
11 or a path reference, and sets either a named property, or a <code>path</code>
12 instance to absolute pathnames of the files with either the N latest or earliest
13 modification dates (based on the <code>age</code> attribute)</p>
14
15 <h2>Parameters</h2>
16 <table border="1" cellpadding="2" cellspacing="0">
17 <tr>
18 <th>Attribute</th>
19 <th>Description</th>
20 <th>Required</th>
21 </tr>
22 <tr>
23 <td valign="top">property</td>
24 <td valign="top">The property to set with the most recently modified file. Mutually
25 exclusive with the <code>outputsetid</code> attribute.</td>
26 <td align="center" valign="top">Yes, if <code>outputsetid</code> is not specified.</td>
27 </tr>
28 <tr>
29 <td valign="top">outputsetid</td>
30 <td valign="top">The id of a <code>path</code> instance which will contain the
31 resulting list of files. This id should not already exist. Mutually exclusive
32 with the <code>property</code> attribute</td>
33 <td align="center" valign="top">Yes, if <code>property</code> is note specified.</td>
34 </tr>
35 <tr>
36 <td valign="top">count</td>
37 <td valign="top">The number of files to find. If more than 1, than the
38 files in the output appear in the order indicated by the <code>age</code>
39 attribute.</td>
40 <td align="center" valign="top">No. Defaults to <code>1<code></td>
41 </tr>
42 <tr>
43 <td valign="top">age</td>
44 <td valign="top">The age of the files to retrieve, either <code>eldest</code>
45 or <code>youngest</code>. Defaults to <code>youngest</code>.</td>
46 <td align="center" valign="top">No. Defaults to <code>1<code></td>
47 </tr>
48 <tr>
49 <td valign="top">pathSep</td>
50 <td valign="top">The path separator to separate paths with when using the
51 <code>property</code> attribute in conjunction with the <code>count</code>
52 attribute</td>
53 <td align="center" valign="top">No. Defaults to <code>,<code></td>
54 </tr>
55 <tr>
56 <td valign="top">pathref</td>
57 <td valign="top">Id of the path to find the most recently modified file in.</td>
58 <td align="center" valign="top">No, if a <code>path</code> subelement is
59 specified.</td>
60 </tr>
61 </table>
62
63 <h2>Parameters specified as nested elements</h2>
64
65 <a name="path"><h3>path</h3></a>
66
67 <p><a href="http://ant.apache.org/manual/using.html#path">Path</a>
68 is used to select sets of files or directories in which to find the
69 most recently modified file</p>
70
71 <h2>Example</h2>
72
73 <h3>Using a path reference</h3>
74 <pre>
75 <code>
76
77 &lt;path id="mypath"&gt;
78 &lt;fileset dir="${log.dir}"&gt;
79 &lt;include name="update*.log" /&gt;
80 &lt;/fileset&gt;
81 &lt;path&gt;
82 &lt;timestampselector property="most.recent.logs"
83 pathref="mypath" count="3"
84 pathsep=";" /&gt;
85
86 &lt;echo message="${most.recent.logs}" /&gt;
87 </code>
88 </pre>
89
90 <h3>Using a nested <code>path</code> element</h3>
91 <pre>
92 <code>
93
94 &lt;timestampselector property="most.recent.logs"
95 count="3"
96 pathsep=";" &gt;
97 &lt;path&gt;
98 &lt;fileset dir="${log.dir}"&gt;
99 &lt;include name="update*.log" /&gt;
100 &lt;/fileset&gt;
101 &lt;path&gt;
102 &lt;/timestampselector&gt;
103
104 &lt;echo message="${most.recent.logs}" /&gt;
105 </code>
106 </pre>
107
108 <h3>Outputing to a <code>path</code> element</h3>
109 <pre>
110 <code>
111
112 &lt;timestampselector outputsetref="most.recent.logs"
113 pathref="mypath" count="3"&gt;
114 &lt;path&gt;
115 &lt;fileset dir="${log.dir}"&gt;
116 &lt;include name="update*.log" /&gt;
117 &lt;/fileset&gt;
118 &lt;path&gt;
119 &lt;/timestampselector&gt;
120
121 &lt;copy todir="somedir"&gt;
122 &lt;path refid="most.recent.logs" /&gt;
123 &lt;/copy&gt;
124 </code>
125 </pre>
126
127 <hr>
128 <p align="center">Copyright &copy; 2002-2003 Ant-Contrib Project. All
129 rights Reserved.</p>
130
131 </body>
132 </html>