ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r709177 - /ant/core/trunk/docs/manual/CoreTypes/resources.html
Date Thu, 30 Oct 2008 14:45:45 GMT
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>
+  &lt;project&gt;
+      &lt;filelist id=&quot;allfiles&quot; dir=&quot;${ant.home}/bin&quot;
files=&quot;ant.cmd,foo.txt,ant.bat,bar.txt,ant&quot;/&gt;
+      &lt;restrict id=&quot;missingfiles&quot;&gt;
+          &lt;filelist refid=&quot;allfiles&quot;/&gt;
+          &lt;rsel:not xmlns:rsel=&quot;antlib:org.apache.tools.ant.types.resources.selectors&quot;&gt;
+              &lt;rsel:exists/&gt;
+          &lt;/rsel:not&gt;
+      &lt;/restrict&gt;
+      &lt;echo&gt;These files are missed: ${toString:missingfiles}&lt;/echo&gt;
+  &lt;/project&gt;
+  </pre>
+  <p>The resource collection <i>allfiles</i> defines a list of files which
are expected. The restrict
+  <i>missingfiles</i> uses the <tt>&lt;not&gt;&lt;exists&gt;</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>



Mime
View raw message