Author: jhm
Date: Thu Oct 30 07:45:44 2008
New Revision: 709177
URL: http://svn.apache.org/viewvc?rev=709177&view=rev
Log:
additional example
Modified:
ant/core/trunk/docs/manual/CoreTypes/resources.html
Modified: ant/core/trunk/docs/manual/CoreTypes/resources.html
URL:
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTypes/resources.html?rev=709177&r1=709176&r2=709177&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTypes/resources.html (original)
+++ ant/core/trunk/docs/manual/CoreTypes/resources.html Thu Oct 30 07:45:44 2008
@@ -728,6 +728,23 @@
from the Classpath (already used while compiling).
</p>
+ <pre>
+ <project>
+ <filelist id="allfiles" dir="${ant.home}/bin"
files="ant.cmd,foo.txt,ant.bat,bar.txt,ant"/>
+ <restrict id="missingfiles">
+ <filelist refid="allfiles"/>
+ <rsel:not
xmlns:rsel="antlib:org.apache.tools.ant.types.resources.selectors">
+ <rsel:exists/>
+ </rsel:not>
+ </restrict>
+ <echo>These files are missed: ${toString:missingfiles}</echo>
+ </project>
+ </pre>
+ <p>The resource collection <i>allfiles</i> defines a list of files which are
expected. The restrict
+ <i>missingfiles</i> uses the <tt><not><exists></tt> selector for
getting all files
+ which are not present. Finally we use the <i>toString:</i> <a
href="../using.html#pathshortcut">pathshortcut</a> for
+ getting them in a readable form: <tt>[echo] These files are missed:
....foo.txt;....bar.txt</tt></p>
+
</blockquote>
<h4><a name="sort">sort</a></h4>