1 | <html>
|
---|
2 |
|
---|
3 | <head>
|
---|
4 | <meta http-equiv="Content-Language" content="en-us">
|
---|
5 | <title>FileList Type</title>
|
---|
6 | <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
|
---|
7 | </head>
|
---|
8 |
|
---|
9 | <body>
|
---|
10 |
|
---|
11 | <h2><a name="filelist">FileList</a></h2>
|
---|
12 |
|
---|
13 | <p>FileLists are explicitly named lists of files. Whereas FileSets
|
---|
14 | act as filters, returning only those files that exist in the file
|
---|
15 | system and match specified patterns, FileLists are useful for
|
---|
16 | specifying files that may or may not exist. Multiple files are
|
---|
17 | specified as a list of files, relative to the specified directory,
|
---|
18 | with no support for wildcard expansion (filenames with wildcards will be
|
---|
19 | included in the list unchanged).
|
---|
20 | FileLists can appear inside tasks that support this feature or as stand-alone
|
---|
21 | types.
|
---|
22 | </p>
|
---|
23 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
24 | <tr>
|
---|
25 | <td valign="top"><b>Attribute</b></td>
|
---|
26 | <td valign="top"><b>Description</b></td>
|
---|
27 | <td align="center" valign="top"><b>Required</b></td>
|
---|
28 | </tr>
|
---|
29 | <tr>
|
---|
30 | <td valign="top">dir</td>
|
---|
31 | <td valign="top">The base directory of this FileList.</td>
|
---|
32 | <td valign="top" align="center">Yes</td>
|
---|
33 | </tr>
|
---|
34 | <tr>
|
---|
35 | <td valign="top">files</td>
|
---|
36 | <td valign="top">The list of file names. This is a list of
|
---|
37 | file name separated by whitespace, or by commas.</td>
|
---|
38 | <td valign="top" align="center">
|
---|
39 | Yes, unless there is a nested file element</td>
|
---|
40 | </tr>
|
---|
41 | </table>
|
---|
42 | <h4>Nested Element: file</h4>
|
---|
43 | <p>
|
---|
44 | This represents a file name. The nested element allows filenames containing
|
---|
45 | white space and commas.
|
---|
46 | </p>
|
---|
47 | <p><em>Since ant 1.7</em></p>
|
---|
48 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
49 | <tr>
|
---|
50 | <td valign="top"><b>Attribute</b></td>
|
---|
51 | <td valign="top"><b>Description</b></td>
|
---|
52 | <td align="center" valign="top"><b>Required</b></td>
|
---|
53 | </tr>
|
---|
54 | <tr>
|
---|
55 | <td valign="top">name</td>
|
---|
56 | <td valign="top">The name of the file.</td>
|
---|
57 | <td valign="top" align="center">Yes</td>
|
---|
58 | </tr>
|
---|
59 | </table>
|
---|
60 | <h4>Examples</h4>
|
---|
61 | <blockquote><pre>
|
---|
62 | <filelist
|
---|
63 | id="docfiles"
|
---|
64 | dir="${doc.src}"
|
---|
65 | files="foo.xml,bar.xml"/>
|
---|
66 | </pre></blockquote>
|
---|
67 |
|
---|
68 | <p>The files <code>${doc.src}/foo.xml</code> and
|
---|
69 | <code>${doc.src}/bar.xml</code>. Note that these files may not (yet)
|
---|
70 | actually exist.
|
---|
71 | </p>
|
---|
72 |
|
---|
73 | <blockquote><pre>
|
---|
74 | <filelist
|
---|
75 | id="docfiles"
|
---|
76 | dir="${doc.src}"
|
---|
77 | files="foo.xml
|
---|
78 | bar.xml"/>
|
---|
79 | </pre></blockquote>
|
---|
80 |
|
---|
81 | <p>Same files as the example above.</p>
|
---|
82 |
|
---|
83 | <blockquote><pre>
|
---|
84 | <filelist refid="docfiles"/>
|
---|
85 | </pre></blockquote>
|
---|
86 |
|
---|
87 | <p>Same files as the example above.</p>
|
---|
88 |
|
---|
89 | <blockquote><pre>
|
---|
90 | <filelist
|
---|
91 | id="docfiles"
|
---|
92 | dir="${doc.src}">
|
---|
93 | <file name="foo.xml"/>
|
---|
94 | <file name="bar.xml"/>
|
---|
95 | </filelist>
|
---|
96 | </pre></blockquote>
|
---|
97 |
|
---|
98 | <p>Same files as the example above.</p>
|
---|
99 |
|
---|
100 | <hr>
|
---|
101 | <p align="center">Copyright © 2001-2002,2004 The Apache Software Foundation. All rights
|
---|
102 | Reserved.</p>
|
---|
103 |
|
---|
104 | </body>
|
---|
105 | </html>
|
---|
106 |
|
---|