You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

resourcecount.html 2.3 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
  5. <title>ResourceCount Task</title>
  6. </head>
  7. <body>
  8. <h2>ResourceCount</h2>
  9. <h3>Description</h3>
  10. <p>Display or set a property containing the size of a nested
  11. <a href="../CoreTypes/resources.html#collection">Resource Collection</a>.
  12. Can also be used as a condition. <b>Since Ant 1.7</b></p>
  13. <h3>Parameters</h3>
  14. <table border="1" cellpadding="2" cellspacing="0">
  15. <tr>
  16. <td valign="top"><b>Attribute</b></td>
  17. <td valign="top"><b>Description</b></td>
  18. <td align="center" valign="top"><b>Required</b></td>
  19. </tr>
  20. <tr>
  21. <td valign="top">property</td>
  22. <td valign="top">The property to set. If omitted the results are written
  23. to the log. Ignored when processing as a condition.</td>
  24. <td valign="top" align="center">No</td>
  25. </tr>
  26. <tr>
  27. <td valign="top">refid</td>
  28. <td valign="top">A <a href="../using.html#references">reference</a>
  29. to a Resource Collection.</td>
  30. <td valign="top" align="center">
  31. Yes, unless a nested Resource Collection is supplied
  32. </td>
  33. </tr>
  34. <tr>
  35. <td valign="top">count</td>
  36. <td valign="top">Comparison count for processing as a condition.</td>
  37. <td valign="top" align="center">Yes, in condition mode</td>
  38. </tr>
  39. <tr>
  40. <td valign="top">when</td>
  41. <td valign="top">Comparison type: "equal", "eq", "greater", "gt", "less",
  42. "lt", "ge" (greater or equal), "ne" (not equal), "le" (less or equal)
  43. for use when operating as a condition.</td>
  44. <td valign="top" align="center">No; default is "equal"</td>
  45. </tr>
  46. </table>
  47. <h3>Parameters specified as nested elements</h3>
  48. <h4>Resource Collection</h4>
  49. <p>A single
  50. <a href="../CoreTypes/resources.html#collection">Resource Collection</a>
  51. should be specified via a nested element or the <code>refid</code> attribute.
  52. </p>
  53. <h3>Examples</h3>
  54. <pre>&lt;resourcecount property=&quot;count.foo&quot;&gt;
  55. &lt;filelist dir=&quot;.&quot; files=&quot;foo,bar&quot; /&gt;
  56. &lt;/resourcecount&gt;
  57. </pre>
  58. <p>Stores the number of resources in the specified filelist (two)
  59. in the property named <i>count.foo</i>.</p>
  60. <hr>
  61. <p align="center">Copyright &copy; 2005 The Apache Software Foundation.
  62. All rights Reserved.</p>
  63. </body>
  64. </html>