A DirSet is a group of directories. These directories can be found in a directory tree starting in a base directory and are matched by patterns taken from a number of PatternSets and Selectors.
PatternSets can be specified as nested <patternset>
elements. In addition, DirSet holds an implicit PatternSet and supports
the nested <include>
, <includesfile>
,
<exclude>
and <excludesfile>
elements of <patternset>
directly, as well as <patternset>
's attributes.
Selectors are available as nested elements within the DirSet. If any of the selectors within the DirSet do not select the directory, it is not considered part of the DirSet. This makes a DirSet equivalent to an <and> selector container.
Table D.4: Attributes for the <dirset>
tag
Name | Type | Description | Default | Required |
---|---|---|---|---|
dir | String | The root of the directory tree of this DirSet. | n/a | Yes |
casesensitive | Boolean | Specifies whether case-sensitivity should be applied
(true|yes|on or false|no|off ). | true | No |
expandsymboliclinks | Boolean | Whether to expand/dereference (follow) symbolic links - set to 'true' to emulate old Phing behavior. | false | No |
includes | String | A comma- or space-separated list of patterns of directories that must be included; all directories are included when omitted. | n/a | No |
includesfile | String | The name of a file; each line of this file is taken to be an include pattern. Note: if the file is empty and there are no other patterns defined for the fileset, all directories will be included. | n/a | No |
excludes | String | A comma- or space-separated list of patterns of directories that must be excluded; no directories are excluded when omitted. | n/a | No |
excludesfile | String | The name of a file; each line of this file is taken to be an exclude pattern. | n/a | No |
test*.xml
will include test_42.xml
,
but it will not include test/some.xml
.
test**.xml
fits to test_42.xml
as
well as to test/bla.xml
, for example.
**/*.ent.xml
fits to all files that end with
ent.xml
in all subdirectories of the directory
specified with the dir
attribute of the
<fileset>
tag. However, it will not include any
files that are directly in the base directory of the file set.
<dirset dir="/etc" > <include name="httpd/**" /> <include name="php.ini" /> </dirset> <dirset dir="/etc" > <patternset> <include name="**/*.php"/> <exclude name="**/*Test*"/> </patternset> </dirset>
This will include the apache configuration and PHP configuration file from
/etc
.
The tags that are supported by Fileset
are:
include
exclude
any of the selectors
The <include>
and the <exclude>
tags
must have a name
attribute that contains the pattern to
include/exclude.