FileSet DataType
The fileset DataType
defines a group of files and is commonly represented by the
<fileset> element. However, many Ant tasks
form implicit
filesets, which
means they support all fileset attributes and
nested elements. Unlike the filelist type, files
represented by fileset must exist.
Filesets may also be specified as target-level
buildfile elements (i.e., children of
<project>) and referenced by their
ids. Following is a list of
fileset attributes:
-
dir(all, Path, Y) The base directory for the
fileset.-
casesensitive(1.4.1, boolean N) If set to
false, thefilesetis not case-sensitive when matching filenames. Defaults totrue. Ant versions prior to 1.4.1 use case-sensitive matching.-
defaultexcludes(all, boolean, N) Determines whether to use default excludes. Defaults to
true. Default excludes consists of: **/*~, **/#*#, **/.#*, **/%*%, **/CVS, **/CVS/**, **/.cvsignore, **/SCCS, **/SCCS/**, and **/vssver.scc.-
excludes(all, String, N) A comma-separated list of file patterns to exclude. These are in addition to the default excludes.
-
excludesfile(all, File, N) The name of a file containing one exclude pattern per line. These are in addition to the default excludes.
-
includes(all, String, N) A comma-separated list of file patterns to include.
-
includesfile(all, File, N) The name of a file containing one include pattern per line.
In addition to the attributes listed, a fileset
may also contain the following:
- 0..n nested
patternsetelements:<exclude>,<include>,<patternset> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access