source: other-projects/trunk/realistic-books/packages/AntInstaller/web/manual1.7.0/manual/CoreTasks/resourcecount.html@ 19253

Last change on this file since 19253 was 19253, checked in by davidb, 15 years ago

Establishing a source code repository for Veronica's Realistic Book's software

File size: 3.0 KB
Line 
1<!--
2 Licensed to the Apache Software Foundation (ASF) under one or more
3 contributor license agreements. See the NOTICE file distributed with
4 this work for additional information regarding copyright ownership.
5 The ASF licenses this file to You under the Apache License, Version 2.0
6 (the "License"); you may not use this file except in compliance with
7 the License. You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17<html>
18
19<head>
20<meta http-equiv="Content-Language" content="en-us">
21<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
22<title>ResourceCount Task</title>
23</head>
24
25<body>
26
27<h2><a name="resourcecount">ResourceCount</a></h2>
28<h3>Description</h3>
29<p>Display or set a property containing the size of a nested
30 <a href="../CoreTypes/resources.html#collection">Resource Collection</a>.
31 Can also be used as a condition. <b>Since Ant 1.7</b></p>
32<h3>Parameters</h3>
33<table border="1" cellpadding="2" cellspacing="0">
34 <tr>
35 <td valign="top"><b>Attribute</b></td>
36 <td valign="top"><b>Description</b></td>
37 <td align="center" valign="top"><b>Required</b></td>
38 </tr>
39 <tr>
40 <td valign="top">property</td>
41 <td valign="top">The property to set. If omitted the results are written
42 to the log. Ignored when processing as a condition.</td>
43 <td valign="top" align="center">No</td>
44 </tr>
45 <tr>
46 <td valign="top">refid</td>
47 <td valign="top">A <a href="../using.html#references">reference</a>
48 to a Resource Collection.</td>
49 <td valign="top" align="center">
50 Yes, unless a nested Resource Collection is supplied
51 </td>
52 </tr>
53 <tr>
54 <td valign="top">count</td>
55 <td valign="top">Comparison count for processing as a condition.</td>
56 <td valign="top" align="center">Yes, in condition mode</td>
57 </tr>
58 <tr>
59 <td valign="top">when</td>
60 <td valign="top">Comparison type: "equal", "eq", "greater", "gt", "less",
61 "lt", "ge" (greater or equal), "ne" (not equal), "le" (less or equal)
62 for use when operating as a condition.</td>
63 <td valign="top" align="center">No; default is "equal"</td>
64 </tr>
65</table>
66<h3>Parameters specified as nested elements</h3>
67<h4>Resource Collection</h4>
68<p>A single
69 <a href="../CoreTypes/resources.html#collection">Resource Collection</a>
70should be specified via a nested element or the <code>refid</code> attribute.
71</p>
72<h3>Examples</h3>
73<pre>&lt;resourcecount property=&quot;count.foo&quot;&gt;
74 &lt;filelist dir=&quot;.&quot; files=&quot;foo,bar&quot; /&gt;
75&lt;/resourcecount&gt;
76</pre>
77<p>Stores the number of resources in the specified filelist (two)
78in the property named <i>count.foo</i>.</p>
79
80</body>
81</html>
82
Note: See TracBrowser for help on using the repository browser.