|
|
@@ -0,0 +1,600 @@ |
|
|
|
<html> |
|
|
|
|
|
|
|
<head> |
|
|
|
<meta http-equiv="Content-Language" content="en-us"> |
|
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> |
|
|
|
<title>Resources and Resource Collections</title> |
|
|
|
</head> |
|
|
|
|
|
|
|
<body> |
|
|
|
|
|
|
|
<h2><a name="resource">Resources</a></h2> |
|
|
|
<p> |
|
|
|
A file-like entity can be abstracted to the concept of a <i>resource</i>. |
|
|
|
In addition to providing access to file-like attributes, a resource |
|
|
|
implementation should, when possible, provide the means to read content |
|
|
|
from and/or write content to the underlying entity. Although the resource |
|
|
|
concept was introduced in <i>Ant 1.5.2</i>, resources are available for |
|
|
|
explicit use beginning in <b>Ant 1.7</b>. |
|
|
|
</p> |
|
|
|
|
|
|
|
<h3>The built-in resource types are:</h3> |
|
|
|
|
|
|
|
<ul> |
|
|
|
<li><a href="#basic">resource</a> - a basic resource.</li> |
|
|
|
<li><a href="#file">file</a> - a file.</li> |
|
|
|
<li><a href="#zipentry">zipentry</a> - an entry in a zip file.</li> |
|
|
|
<li><a href="#url">url</a> - a URL.</li> |
|
|
|
<li><a href="#string">string</a> - a text string.</li> |
|
|
|
<li><a href="#property">property</a> - an Ant property.</li> |
|
|
|
</ul> |
|
|
|
|
|
|
|
<h4><a name="basic">resource</a></h4> |
|
|
|
|
|
|
|
<p>A basic resource. Other resource types derive from this basic |
|
|
|
type; as such all its attributes are available, though in most cases |
|
|
|
irrelevant attributes will be ignored. This and all resource |
|
|
|
implementations are also usable as single-element |
|
|
|
<a href="#collection">Resource Collections</a>. |
|
|
|
</p> |
|
|
|
|
|
|
|
<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">name</td> |
|
|
|
<td valign="top">The name of this resource</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">exists</td> |
|
|
|
<td valign="top">Whether this resource exists</td> |
|
|
|
<td align="center" valign="top">No, default <i>true</i></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">lastmodified</td> |
|
|
|
<td valign="top">The last modification time of this resource</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">directory</td> |
|
|
|
<td valign="top">Whether this resource is directory-like</td> |
|
|
|
<td align="center" valign="top">No, default <i>false</i></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">size</td> |
|
|
|
<td valign="top">The size of this resource</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
|
|
|
|
<h4><a name="file">file</a></h4> |
|
|
|
|
|
|
|
<p>Represents a file accessible via local filesystem conventions.</p> |
|
|
|
|
|
|
|
<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">file</td> |
|
|
|
<td valign="top">The file represented by this resource</td> |
|
|
|
<td align="center" valign="top">Yes</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">base</td> |
|
|
|
<td valign="top">The base directory of this resource. When this |
|
|
|
attribute is set, attempts to access the name of the resource |
|
|
|
will yield a path relative to this location.</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
|
|
|
|
<h4><a name="zipentry">zipentry</a></h4> |
|
|
|
|
|
|
|
<p>Represents an entry in a ZIP archive.</p> |
|
|
|
|
|
|
|
<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">zipfile</td> |
|
|
|
<td valign="top">The zip file containing this resource</td> |
|
|
|
<td align="center" valign="top">Yes</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">name</td> |
|
|
|
<td valign="top">The name of the archived resource</td> |
|
|
|
<td align="center" valign="top">Yes</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">encoding</td> |
|
|
|
<td valign="top">The encoding of the zipfile</td> |
|
|
|
<td align="center" valign="top">No; |
|
|
|
platform default used if unspecified</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
|
|
|
|
<h4><a name="url">url</a></h4> |
|
|
|
|
|
|
|
<p>Represents a URL.</p> |
|
|
|
|
|
|
|
<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">url</td> |
|
|
|
<td valign="top">The url to expose</td> |
|
|
|
<td rowspan="3" align="center" valign="middle">Exactly one of these</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">file</td> |
|
|
|
<td valign="top">The file to expose as a file: url</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">javaresource</td> |
|
|
|
<td valign="top">The Java resource to expose as a jar: url</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">classpath</td> |
|
|
|
<td valign="top">The classpath to use when establishing the URL |
|
|
|
for a Java resource</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
<p>The classpath along which to search for a Java resource |
|
|
|
can also be specified by means of one or more nested |
|
|
|
<code><a href="../using.html#path">classpath</a></code> elements. |
|
|
|
</p> |
|
|
|
|
|
|
|
<h4><a name="string">string</a></h4> |
|
|
|
|
|
|
|
<p>Represents a Java String. As such a string is readable but not writable.</p> |
|
|
|
|
|
|
|
<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">value</td> |
|
|
|
<td valign="top">The value of this resource</td> |
|
|
|
<td align="center" valign="top">Yes</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
|
|
|
|
<h4><a name="property">property</a></h4> |
|
|
|
|
|
|
|
<p>Represents an Ant property.</p> |
|
|
|
|
|
|
|
<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">name</td> |
|
|
|
<td valign="top">The property name</td> |
|
|
|
<td align="center" valign="top">Yes</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
|
|
|
|
<hr> |
|
|
|
<h2><a name="collection">Resource Collections</a></h2> |
|
|
|
<p> |
|
|
|
A Resource Collection is an abstraction of an entity that groups |
|
|
|
together a number of <a href="#resource">resources</a>. Several of |
|
|
|
Ant's "legacy" datatypes have been modified to behave as Resource Collections: |
|
|
|
<ul> |
|
|
|
<li><a href="fileset.html">fileset</a>, |
|
|
|
<a href="dirset.html">dirset</a>, |
|
|
|
<a href="filelist.html">filelist</a>, and |
|
|
|
<a href="../using.html#path">path</a> |
|
|
|
(and derivative types) expose <a href="#file">file</a> resources |
|
|
|
</li> |
|
|
|
<li><a href="zipfileset.html">zipfileset</a> |
|
|
|
can expose <a href="#file">file</a> or <a href="#zipentry">zipentry</a> |
|
|
|
resources depending on configuration |
|
|
|
</li> |
|
|
|
<li><a href="propertyset.html">propertyset</a> |
|
|
|
exposes <a href="#property">property</a> resources |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</p> |
|
|
|
<h3>The additional built-in resource collections are:</h3> |
|
|
|
<ul> |
|
|
|
<li><a href="#resources">resources</a> - generic resource collection</li> |
|
|
|
<li><a href="#files">files</a> - collection of files similar to |
|
|
|
<a href="fileset.html">fileset</a></li> |
|
|
|
<li><a href="#restrict">restrict</a> - restrict a resource collection |
|
|
|
to include only resources meeting specified criteria</li> |
|
|
|
<li><a href="#sort">sort</a> - sorted resource collection</li> |
|
|
|
<li><a href="#union">union</a> - set union of nested resource collections</li> |
|
|
|
<li><a href="#intersect">intersect</a> - set intersection |
|
|
|
of nested resource collections</li> |
|
|
|
<li><a href="#difference">difference</a> - set difference |
|
|
|
of nested resource collections</li> |
|
|
|
</ul> |
|
|
|
<h4><a name="resources">resources</a></h4> |
|
|
|
<p>A generic resource collection, designed for use with |
|
|
|
<a href="../using.html#references">references</a>. |
|
|
|
For example, if a third-party Ant task generates a Resource Collection |
|
|
|
of an unknown type, it can still be accessed via a |
|
|
|
<code><resources></code> collection. The secondary use of this |
|
|
|
collection type is as a container of other resource collections, |
|
|
|
preserving the order of nested collections as well as |
|
|
|
duplicate resources (contrast with <a href="#union">union</a>). |
|
|
|
</p> |
|
|
|
|
|
|
|
<h4><a name="files">files</a></h4> |
|
|
|
<p>A group of files. These files are matched by <b>absolute</b> patterns |
|
|
|
taken from a number of <a href="patternset.html">PatternSets</a>. |
|
|
|
These can be specified as nested <code><patternset></code> |
|
|
|
elements. In addition, <code><files></code> holds an implicit |
|
|
|
PatternSet and supports the nested <code><include></code>, |
|
|
|
<code><includesfile></code>, <code><exclude></code> |
|
|
|
and <code><excludesfile></code> elements of PatternSet directly, |
|
|
|
as well as PatternSet's attributes. |
|
|
|
</p> |
|
|
|
<p><a href="selectors.html">File Selectors</a> are available as nested |
|
|
|
elements. A file must be selected by all selectors in order to be included; |
|
|
|
<code><files></code> is thus equivalent to an |
|
|
|
<code><and></code> file selector container. |
|
|
|
</p> |
|
|
|
<p><b>More simply put</b>, this type is equivalent to a |
|
|
|
<a href="fileset.html">fileset</a> with no base directory. |
|
|
|
<b>Please note</b> that without a base directory, |
|
|
|
filesystem scanning is based entirely on include and exclude patterns. |
|
|
|
A <a href="selectors.html#filenameselect">filename</a> (or any) |
|
|
|
selector can <i>only</i> influence the scanning process <i>after</i> |
|
|
|
the file has been included based on pattern-based selection. |
|
|
|
</p> |
|
|
|
|
|
|
|
<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">includes</td> |
|
|
|
<td valign="top">comma- or space-separated list of patterns |
|
|
|
of files that must be included</td> |
|
|
|
<td rowspan="2" valign="middle" align="center">At least one of these</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">includesfile</td> |
|
|
|
<td valign="top">the name of a file; each line of this file is |
|
|
|
taken to be an include pattern.</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">excludes</td> |
|
|
|
<td valign="top">comma- or space-separated list of patterns |
|
|
|
of files that must be excluded</td> |
|
|
|
<td rowspan="2" valign="top" align="center">No, default none |
|
|
|
(except default excludes when true)</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">excludesfile</td> |
|
|
|
<td valign="top">the name of a file; each line of this file is |
|
|
|
taken to be an exclude pattern.</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">defaultexcludes</td> |
|
|
|
<td valign="top">Whether |
|
|
|
<a href="../dirtasks.html#defaultexcludes">default excludes</a> |
|
|
|
should be used</td> |
|
|
|
<td valign="top" align="center">No, default <i>true</i></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">casesensitive</td> |
|
|
|
<td valign="top">Whether patterns are case-sensitive</td> |
|
|
|
<td valign="top" align="center">No, default <i>true</i></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">followsymlinks</td> |
|
|
|
<td valign="top">Whether to follow symbolic links |
|
|
|
(see note <a href="#symlink">below</a>)</td> |
|
|
|
<td valign="top" align="center">No, default <i>true</i></td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
|
|
|
|
<p><a name="symlink"><b>Note</b></a>: All files/directories for which |
|
|
|
the canonical path is different from its path are considered symbolic |
|
|
|
links. On Unix systems this usually means the file really is a |
|
|
|
symbolic link but it may lead to false results on other |
|
|
|
platforms. |
|
|
|
</p> |
|
|
|
|
|
|
|
<h4><a name="restrict">restrict</a></h4> |
|
|
|
<p>Restricts another nested resource collection using resource selectors: |
|
|
|
<blockquote> |
|
|
|
<h4>Parameters specified as nested elements</h4> |
|
|
|
<p>A single resource collection is required.</p> |
|
|
|
<p>Nested resource selectors are used to "narrow down" the included |
|
|
|
resources. These are patterned after <a href="selectors.html">file |
|
|
|
selectors</a> but are, unsurprisingly, targeted to resources. |
|
|
|
Several built-in resource selectors are available in the internal |
|
|
|
<a href="antlib.html">antlib</a> |
|
|
|
<code>org.apache.tools.ant.types.resources.selectors</code>: |
|
|
|
</p> |
|
|
|
|
|
|
|
<ul> |
|
|
|
<li><a href="#rsel.name">name</a> - select resources by name.</li> |
|
|
|
<li><a href="#rsel.exists">exists</a> - select existing resources.</li> |
|
|
|
<li><a href="#rsel.date">date</a> - select resources by date.</li> |
|
|
|
<li><a href="#rsel.type">type</a> - select resources by type.</li> |
|
|
|
<li><a href="#rsel.size">size</a> - select resources by size.</li> |
|
|
|
<li><a href="#rsel.instanceof">instanceof</a> |
|
|
|
- select resources by class or Ant datatype.</li> |
|
|
|
<li><a href="#rsel.and">and</a> - "and" nested resource selectors.</li> |
|
|
|
<li><a href="#rsel.or">or</a> - "or" nested resource selectors.</li> |
|
|
|
<li><a href="#rsel.not">not</a> - "not" a nested resource selector.</li> |
|
|
|
<li><a href="#rsel.none">none</a> |
|
|
|
- select resources selected by no nested resource selectors.</li> |
|
|
|
<li><a href="#rsel.majority">majority</a> - select resources selected |
|
|
|
by a majority of nested resource selectors.</li> |
|
|
|
</ul> |
|
|
|
|
|
|
|
<h4><a name="rsel.name">name</a></h4> |
|
|
|
<p>Selects resources by name.</p> |
|
|
|
<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">name</td> |
|
|
|
<td valign="top">The name pattern to test</td> |
|
|
|
<td align="center" valign="top">Yes</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">casesensitive</td> |
|
|
|
<td valign="top">Whether name comparisons are case-sensitive</td> |
|
|
|
<td align="center" valign="top">No, default <i>true</i></td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
|
|
|
|
<h4><a name="rsel.exists">exists</a></h4> |
|
|
|
<p>Selects existing resources.</p> |
|
|
|
|
|
|
|
<h4><a name="rsel.date">date</a></h4> |
|
|
|
<p>Selects resources by date.</p> |
|
|
|
<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">millis</td> |
|
|
|
<td valign="top">The comparison date/time in ms since January 1, 1970</td> |
|
|
|
<td rowspan="2" align="center" valign="middle">One of these</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">datetime</td> |
|
|
|
<td valign="top">The formatted comparison date/time</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">pattern</td> |
|
|
|
<td valign="top">SimpleDateFormat-compatible pattern |
|
|
|
for use with the <code>datetime</code> attribute</td> |
|
|
|
<td align="center" valign="top"> |
|
|
|
No, default is "MM/DD/YYYY HH:MM AM_or_PM"</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">granularity</td> |
|
|
|
<td valign="top">The number of milliseconds leeway to use when |
|
|
|
comparing file modification times. This is needed because not |
|
|
|
every file system supports tracking the last modified time to |
|
|
|
the millisecond level.</td> |
|
|
|
<td align="center" valign="top">No; default varies by platform: |
|
|
|
FAT filesystems = 2 sec; Unix = 1 sec; NTFS = 1 ms.</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">when</td> |
|
|
|
<td valign="top">One of "before", "after", "equal"</td> |
|
|
|
<td align="center" valign="top">No, default "equal"</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
|
|
|
|
<h4><a name="rsel.type">type</a></h4> |
|
|
|
<p>Selects resources by type (file or directory).</p> |
|
|
|
<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">type</td> |
|
|
|
<td valign="top">One of "file", "dir"</td> |
|
|
|
<td align="center" valign="top">Yes</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
|
|
|
|
<h4><a name="rsel.size">size</a></h4> |
|
|
|
<p>Selects resources by size.</p> |
|
|
|
<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">size</td> |
|
|
|
<td valign="top">The size to compare</td> |
|
|
|
<td align="center" valign="top">Yes</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">when</td> |
|
|
|
<td valign="top">One of "equal", "eq", "greater", "gt", "less", "lt", |
|
|
|
"ge" (greater or equal), "ne" (not equal), "le" (less or equal)</td> |
|
|
|
<td align="center" valign="top">No, default "equal"</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
|
|
|
|
<h4><a name="rsel.instanceof">instanceof</a></h4> |
|
|
|
<p>Selects resources by type.</p> |
|
|
|
<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">class</td> |
|
|
|
<td valign="top">The class of which the resource must be an instance</td> |
|
|
|
<td rowspan="2" align="center" valign="middle">One of these</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">type</td> |
|
|
|
<td valign="top">The Ant type that must |
|
|
|
be assignable from the resource</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">uri</td> |
|
|
|
<td valign="top">The uri in which <i>type</i> must be defined</td> |
|
|
|
<td valign="top">No</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
|
|
|
|
<h4><a name="rsel.and">and</a></h4> |
|
|
|
<p>Selects a resource if it is selected by all nested resource selectors.</p> |
|
|
|
|
|
|
|
<h4><a name="rsel.or">or</a></h4> |
|
|
|
<p>Selects a resource if it is selected |
|
|
|
by at least one nested resource selector.</p> |
|
|
|
|
|
|
|
<h4><a name="rsel.not">not</a></h4> |
|
|
|
<p>Negates the selection result of the single |
|
|
|
nested resource selector allowed.</p> |
|
|
|
|
|
|
|
<h4><a name="rsel.none">none</a></h4> |
|
|
|
<p>Selects a resource if it is selected |
|
|
|
by no nested resource selectors.</p> |
|
|
|
|
|
|
|
<h4><a name="rsel.majority">majority</a></h4> |
|
|
|
<p>Selects a resource if it is selected |
|
|
|
by the majority of nested resource selectors.</p> |
|
|
|
<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">allowtie</td> |
|
|
|
<td valign="top">Whether a tie (when there is an even number |
|
|
|
of nested resource selectors) is considered a majority</td> |
|
|
|
<td valign="top">No, default <i>true</i></td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
|
|
|
|
</blockquote> |
|
|
|
|
|
|
|
<h4><a name="sort">sort</a></h4> |
|
|
|
|
|
|
|
<p>Sorts another nested resource collection according to the resources' |
|
|
|
natural order, or by one or more nested resource comparators:</p> |
|
|
|
<blockquote> |
|
|
|
<h4>Parameters specified as nested elements</h4> |
|
|
|
<p>A single resource collection is required.</p> |
|
|
|
<p>The sort can be controlled and customized by specifying one or more |
|
|
|
resource comparators. Resources can be sorted according to multiple |
|
|
|
criteria; the first specified is the "outermost", while the last |
|
|
|
specified is the "innermost". Several built-in resource comparators |
|
|
|
are available in the internal <a href="antlib.html">antlib</a> |
|
|
|
<code>org.apache.tools.ant.types.resources.comparators</code>: |
|
|
|
</p> |
|
|
|
|
|
|
|
<ul> |
|
|
|
<li><a href="#rcmp.name">name</a> - sort resources by name</li> |
|
|
|
<li><a href="#rcmp.exists">exists</a> - sort resources by existence</li> |
|
|
|
<li><a href="#rcmp.date">date</a> - sort resources by date</li> |
|
|
|
<li><a href="#rcmp.type">type</a> - sort resources by type</li> |
|
|
|
<li><a href="#rcmp.size">size</a> - sort resources by size</li> |
|
|
|
<li><a href="#rcmp.content">content</a> - sort resources by content</li> |
|
|
|
<li><a href="#rcmp.reverse">reverse</a> - reverse the natural sort order, |
|
|
|
or a single nested resource comparator</li> |
|
|
|
</ul> |
|
|
|
|
|
|
|
<h4><a name="rcmp.name">name</a></h4> |
|
|
|
<p>Sort resources by name.</p> |
|
|
|
|
|
|
|
<h4><a name="rcmp.exists">exists</a></h4> |
|
|
|
<p>Sort resources by existence. |
|
|
|
Not existing is considered "less than" existing.</p> |
|
|
|
|
|
|
|
<h4><a name="rcmp.date">date</a></h4> |
|
|
|
<p>Sort resources by date.</p> |
|
|
|
|
|
|
|
<h4><a name="rcmp.type">type</a></h4> |
|
|
|
<p>Sort resources by type (file or directory). |
|
|
|
Because directories contain files, they are considered "greater".</p> |
|
|
|
|
|
|
|
<h4><a name="rcmp.size">size</a></h4> |
|
|
|
<p>Sort resources by size.</p> |
|
|
|
|
|
|
|
<h4><a name="rcmp.content">content</a></h4> |
|
|
|
<p>Sort resources by content.</p> |
|
|
|
<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">binary</td> |
|
|
|
<td valign="top">Whether content should be compared in binary mode. |
|
|
|
If <i>false<i>, content will be compared without regard to |
|
|
|
platform-specific line-ending conventions.</td> |
|
|
|
<td valign="top">No, default <i>true</i></td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
|
|
|
|
<h4><a name="rcmp.reverse">reverse</a></h4> |
|
|
|
<p>Reverse the natural sort order, or a single nested comparator.</p> |
|
|
|
|
|
|
|
</blockquote> |
|
|
|
|
|
|
|
<h4><a name="setlogic">Set operations</a></h4> |
|
|
|
<blockquote> |
|
|
|
<p>The following resource collections implement set operations:</p> |
|
|
|
<ul> |
|
|
|
<li><a href="#union">union</a></li> |
|
|
|
<li><a href="#intersect">intersect</a></li> |
|
|
|
<li><a href="#difference">difference</a></li> |
|
|
|
</ul> |
|
|
|
|
|
|
|
<h4><a name="union">union</a></h4> |
|
|
|
<p>Union of nested resource collections.</p> |
|
|
|
|
|
|
|
<h4><a name="intersect">intersect</a></h4> |
|
|
|
<p>Intersection of nested resource collections.</p> |
|
|
|
|
|
|
|
<h4><a name="difference">difference</a></h4> |
|
|
|
<p>Difference of nested resource collections.</p> |
|
|
|
|
|
|
|
</blockquote> |
|
|
|
|
|
|
|
<hr> |
|
|
|
<p align="center">Copyright © 2005 The Apache Software Foundation. All rights |
|
|
|
Reserved.</p> |
|
|
|
|
|
|
|
</body> |
|
|
|
</html> |