2005-01-04 22:20:44 +00:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Language" content="en-us">
|
2005-03-07 18:09:10 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css"/>
|
2005-01-04 22:20:44 +00:00
|
|
|
<title>Length Task</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<h2>Length</h2>
|
|
|
|
<h3>Description</h3>
|
|
|
|
<p>Display or set a property containing length information for
|
2005-04-07 22:22:26 +00:00
|
|
|
a string, a file, or one or more nested filesets. Can also
|
|
|
|
be used as a condition. <b>Since Ant 1.6.3</b></p>
|
2005-01-04 22:20:44 +00:00
|
|
|
<h3>Parameters</h3>
|
|
|
|
<table border="1" cellpadding="2" cellspacing="0">
|
|
|
|
<tr>
|
|
|
|
<td valign="top"><b>Attribute</b></td>
|
|
|
|
<td valign="top"><b>Description</b></td>
|
|
|
|
<td align="center" valign="top"><b>Required</b></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">property</td>
|
|
|
|
<td valign="top">The property to set. If omitted
|
2005-04-07 22:22:26 +00:00
|
|
|
the results are written to the log. Ignored when
|
|
|
|
processing as a condition.</td>
|
2005-01-04 22:20:44 +00:00
|
|
|
<td valign="top" align="center">No</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">file</td>
|
|
|
|
<td valign="top">Single file whose length to report.</td>
|
|
|
|
<td valign="top" align="center" rowspan="2">One of these,
|
|
|
|
or one or more nested filesets</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">string</td>
|
|
|
|
<td valign="top">The string whose length to report.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">mode</td>
|
|
|
|
<td valign="top">File length mode; when "all" the resulting
|
|
|
|
value is the sum of all included files' lengths; when "each"
|
|
|
|
the task outputs the absolute path and length of each included file,
|
2005-04-07 22:22:26 +00:00
|
|
|
one per line. Ignored when processing as a condition.</td>
|
2005-01-04 22:20:44 +00:00
|
|
|
<td valign="top" align="center">No; default is "all"</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">trim</td>
|
|
|
|
<td valign="top">Whether to trim when operating on a string.</td>
|
|
|
|
<td valign="top" align="center">No; only valid when string is set</td>
|
|
|
|
</tr>
|
2005-04-07 22:22:26 +00:00
|
|
|
<tr>
|
|
|
|
<td valign="top">length</td>
|
|
|
|
<td valign="top">Comparison length for processing as a condition.</td>
|
|
|
|
<td valign="top" align="center">Yes, in condition mode</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">when</td>
|
|
|
|
<td valign="top">Comparison type: "equal", "greater", "less"
|
|
|
|
for use when operating as a condition.</td>
|
|
|
|
<td valign="top" align="center">No; default is "equal"</td>
|
|
|
|
</tr>
|
2005-01-04 22:20:44 +00:00
|
|
|
</table>
|
|
|
|
<h3>Parameters specified as nested elements</h3>
|
|
|
|
<h4>fileset</h4><p>You can include files via nested
|
|
|
|
<a href="../CoreTypes/fileset.html">fileset</a>s.</p>
|
|
|
|
<h3>Examples</h3>
|
|
|
|
<pre><length string="foo" property="length.foo" />
|
|
|
|
</pre>
|
|
|
|
<p>Stores the length of the string "foo" in the property named
|
|
|
|
<i>length.foo</i>.</p>
|
|
|
|
<pre><length file="bar" property="length.bar" />
|
|
|
|
</pre>
|
|
|
|
<p>Stores the length of file "bar" in the property named
|
|
|
|
<i>length.bar</i>.</p>
|
|
|
|
<hr />
|
|
|
|
<p align="center">Copyright © 2005 The Apache Software Foundation.
|
|
|
|
All rights Reserved.</p>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|