Javatpoint Logo
Javatpoint Logo

Apache Ant Length Task

This tasks is used to set length property of any string or file. It can also be used for display property value or as a condition.

It has various attributes which are given below.

Apache Ant Length Task Attributes

Attribute Description Required
Task Condition
property It is used to set length. No Ignored
mode It is used with file length mode. No Ignored
file Single file whose length to report. One of these, or one or more nested filesets.
resource Single resource whose length to report.
string The string whose length to report.
trim Trim while working on string No
length Comparison length. Ignored Yes
when Comparison type: equal, eq, greater etc. Ignored No

Lets see some example in which we are setting length of string and file too.

Apache Ant Length Task Example

Storing String Length:

Storing File Length:

Storing file path and their length into length property.





Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA