source: other-projects/trunk/realistic-books/packages/AntInstaller/web/manual1.7.0/manual/CoreTasks/copydir.html@ 19253

Last change on this file since 19253 was 19253, checked in by davidb, 15 years ago

Establishing a source code repository for Veronica's Realistic Book's software

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