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.

length.html 2.3 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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>Length Task</title>
  6. </head>
  7. <body>
  8. <h2>Length</h2>
  9. <h3>Description</h3>
  10. <p>Display or set a property containing length information for
  11. a string, a file, or one or more nested filesets.</p>
  12. <h3>Parameters</h3>
  13. <table border="1" cellpadding="2" cellspacing="0">
  14. <tr>
  15. <td valign="top"><b>Attribute</b></td>
  16. <td valign="top"><b>Description</b></td>
  17. <td align="center" valign="top"><b>Required</b></td>
  18. </tr>
  19. <tr>
  20. <td valign="top">property</td>
  21. <td valign="top">The property to set. If omitted
  22. the length is written to the log.</td>
  23. <td valign="top" align="center">No</td>
  24. </tr>
  25. <tr>
  26. <td valign="top">file</td>
  27. <td valign="top">Single file whose length to report.</td>
  28. <td valign="top" align="center" rowspan="2">One of these,
  29. or one or more nested filesets</td>
  30. </tr>
  31. <tr>
  32. <td valign="top">string</td>
  33. <td valign="top">The string whose length to report.</td>
  34. </tr>
  35. <tr>
  36. <td valign="top">mode</td>
  37. <td valign="top">File length mode; when &quot;all&quot; the resulting
  38. value is the sum of all included files' lengths; when &quot;each&quot;
  39. the task outputs the absolute path and length of each included file,
  40. one per line.</td>
  41. <td valign="top" align="center">No; default is &quot;all&quot;</td>
  42. </tr>
  43. <tr>
  44. <td valign="top">trim</td>
  45. <td valign="top">Whether to trim when operating on a string.</td>
  46. <td valign="top" align="center">No; only valid when string is set</td>
  47. </tr>
  48. </table>
  49. <h3>Parameters specified as nested elements</h3>
  50. <h4>fileset</h4><p>You can include files via nested
  51. <a href="../CoreTypes/fileset.html">fileset</a>s.</p>
  52. <h3>Examples</h3>
  53. <pre>&lt;length string=&quot;foo&quot; property=&quot;length.foo&quot; /&gt;
  54. </pre>
  55. <p>Stores the length of the string &quot;foo&quot; in the property named
  56. <i>length.foo</i>.</p>
  57. <pre>&lt;length file=&quot;bar&quot; property=&quot;length.bar&quot; /&gt;
  58. </pre>
  59. <p>Stores the length of file &quot;bar&quot; in the property named
  60. <i>length.bar</i>.</p>
  61. <hr />
  62. <p align="center">Copyright &copy; 2005 The Apache Software Foundation.
  63. All rights Reserved.</p>
  64. </body>
  65. </html>