diff --git a/docs/manual/CoreTasks/resourcecount.html b/docs/manual/CoreTasks/resourcecount.html index 30fb57885..e191485ae 100644 --- a/docs/manual/CoreTasks/resourcecount.html +++ b/docs/manual/CoreTasks/resourcecount.html @@ -25,6 +25,7 @@
Display or set a property containing the size of a nested Resource Collection. @@ -63,12 +64,14 @@
A single
Resource Collection
should be specified via a nested element or the refid
attribute.
<resourcecount property="count.foo"> <filelist dir="." files="foo,bar" /> @@ -77,6 +80,28 @@ should be specified via a nested element or therefid
attribute.Stores the number of resources in the specified filelist (two) in the property named count.foo.
++<project> + <property name="file" value="${ant.file}"/> + <resourcecount property="file.lines"> + <tokens> + <concat> + <filterchain> + <tokenfilter> + <linetokenizer/> + </tokenfilter> + </filterchain> + <fileset file="${file}"/> + </concat> + </tokens> + </resourcecount> + <echo>The file '${file}' has ${file.lines} lines.</echo> +</project> ++Stores the number of lines of the current buildfile in the property file.lines. +Requires Ant 1.7.1+ as <concat> has to be resource.
+ +