source: release-kits/lirk3/bin/ant-installer/web/manual1.6.2/manual/CoreTasks/copydir.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 4.9 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>Copydir Task</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="copydir">Copydir</a></h2>
12<h3><i>Deprecated</i></h3>
13<p><i>This task has been deprecated. Use the Copy task instead.</i></p>
14<h3>Description</h3>
15<p>Copies a directory tree from the source to the destination.</p>
16<p>It is possible to refine the set of files that are being copied. This can be
17done with the <i>includes</i>, <i>includesfile</i>, <i>excludes</i>, <i>excludesfile</i> and <i>defaultexcludes</i>
18attributes. With the <i>includes</i> or <i>includesfile</i> attribute you specify the files you want to
19have included by using patterns. The <i>exclude</i> or <i>excludesfile</i> attribute is used to specify
20the files you want to have excluded. This is also done with patterns. And
21finally with the <i>defaultexcludes</i> attribute, you can specify whether you
22want to use default exclusions or not. See the section on <a
23href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the
24inclusion/exclusion of files works, and how to write patterns.</p>
25<p>This task forms an implicit <a href="../CoreTypes/fileset.html">FileSet</a> and
26supports all attributes of <code>&lt;fileset&gt;</code>
27(<code>dir</code> becomes <code>src</code>) as well as the nested
28<code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code> and
29<code>&lt;patternset&gt;</code> elements.</p>
30<h3>Parameters</h3>
31<table border="1" cellpadding="2" cellspacing="0">
32 <tr>
33 <td valign="top"><b>Attribute</b></td>
34 <td valign="top"><b>Description</b></td>
35 <td align="center" valign="top"><b>Required</b></td>
36 </tr>
37 <tr>
38 <td valign="top">src</td>
39 <td valign="top">the directory to copy.</td>
40 <td valign="top" align="center">Yes</td>
41 </tr>
42 <tr>
43 <td valign="top">dest</td>
44 <td valign="top">the directory to copy to.</td>
45 <td valign="top" align="center">Yes</td>
46 </tr>
47 <tr>
48 <td valign="top">includes</td>
49 <td valign="top">comma- or space-separated list of patterns of files that must be
50 included. All files are included when omitted.</td>
51 <td valign="top" align="center">No</td>
52 </tr>
53 <tr>
54 <td valign="top">includesfile</td>
55 <td valign="top">the name of a file. Each line of this file is
56 taken to be an include pattern</td>
57 <td valign="top" align="center">No</td>
58 </tr>
59 <tr>
60 <td valign="top">excludes</td>
61 <td valign="top">comma- or space-separated list of patterns of files that must be
62 excluded. No files (except default excludes) are excluded when omitted.</td>
63 <td valign="top" align="center">No</td>
64 </tr>
65 <tr>
66 <td valign="top">excludesfile</td>
67 <td valign="top">the name of a file. Each line of this file is
68 taken to be an exclude pattern</td>
69 <td valign="top" align="center">No</td>
70 </tr>
71 <tr>
72 <td valign="top">defaultexcludes</td>
73 <td valign="top">indicates whether default excludes should be used or not
74 (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
75 <td valign="top" align="center">No</td>
76 </tr>
77 <tr>
78 <td valign="top">filtering</td>
79 <td valign="top">indicates whether token filtering should take place during
80 the copy</td>
81 <td valign="top" align="center">No</td>
82 </tr>
83 <tr>
84 <td valign="top">flatten</td>
85 <td valign="top">ignore directory structure of source directory,
86 copy all files into a single directory, specified by the <code>dest</code>
87 attribute (default is <code>false</code>).</td>
88 <td valign="top" align="center">No</td>
89 </tr>
90 <tr>
91 <td valign="top">forceoverwrite</td>
92 <td valign="top">overwrite existing files even if the destination
93 files are newer (default is false).</td>
94 <td valign="top" align="center">No</td>
95 </tr>
96</table>
97<h3>Examples</h3>
98<pre> &lt;copydir src=&quot;${src}/resources&quot;
99 dest=&quot;${dist}&quot;
100 /&gt;</pre>
101<p>copies the directory <code>${src}/resources</code> to <code>${dist}</code>.</p>
102<pre> &lt;copydir src=&quot;${src}/resources&quot;
103 dest=&quot;${dist}&quot;
104 includes=&quot;**/*.java&quot;
105 excludes=&quot;**/Test.java&quot;
106 /&gt;</pre>
107<p>copies the directory <code>${src}/resources</code> to <code>${dist}</code>
108recursively. All java files are copied, except for files with the name <code>Test.java</code>.</p>
109<pre> &lt;copydir src=&quot;${src}/resources&quot;
110 dest=&quot;${dist}&quot;
111 includes=&quot;**/*.java&quot;
112 excludes=&quot;mypackage/test/**&quot;/&gt;</pre>
113<p>copies the directory <code>${src}/resources</code> to <code>${dist}</code>
114recursively. All java files are copied, except for the files under the <code>mypackage/test</code>
115directory.</p>
116<hr><p align="center">Copyright &copy; 2000-2002,2004 The Apache Software Foundation. All rights
117Reserved.</p>
118
119</body>
120</html>
121
Note: See TracBrowser for help on using the repository browser.