source: release-kits/lirk3/resources/gs3-release-maker/apache-ant-1.6.5/docs/manual/OptionalTasks/renameextensions.html@ 14982

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

initial import of LiRK3

File size: 3.7 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>RenameExtensions Task</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="renameexts">RenameExtensions</a></h2>
12<h3><i>Deprecated</i></h3>
13<p><i>This task has been deprecated. Use the <a href="../CoreTasks/move.html">move</a>
14task with a <a href="../CoreTypes/mapper.html#glob-mapper">glob mapper</a> instead.</i></p>
15<h3>Description</h3>
16<p>Renames files in the <code>srcDir</code> directory ending with the
17<code>fromExtension</code> string so that they end with the
18<code>toExtension</code> string. Files are only replaced if
19<code>replace</code> is true
20</p>
21<p>See the section on
22<a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the
23inclusion/exclusion of files works, and how to write patterns.
24This task forms an implicit <a href="../CoreTypes/fileset.html">FileSet</a> and
25supports all attributes of <code>&lt;fileset&gt;</code>
26(<code>dir</code> becomes <code>srcDir</code>) as well as the nested
27<code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code> and
28<code>&lt;patternset&gt;</code> elements.</p>
29<h3>Parameters</h3>
30<table border="1" cellpadding="2" cellspacing="0">
31 <tr>
32 <td valign="top"><b>Attribute</b></td>
33 <td valign="top"><b>Description</b></td>
34 <td align="center" valign="top"><b>Required</b></td>
35 </tr>
36 <tr>
37 <td valign="top">defaultexcludes</td>
38 <td valign="top">indicates whether default excludes should be used or not
39 (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when
40 omitted.</td>
41 <td valign="top" align="center">No</td>
42 </tr>
43 <tr>
44 <td valign="top">excludes</td>
45 <td valign="top">comma- or space-separated list of patterns of files that must be
46 excluded. No files (except default excludes) are excluded when
47 omitted.</td>
48 <td valign="top" align="center">No</td>
49 </tr>
50 <tr>
51 <td valign="top">excludesfile</td>
52 <td valign="top">the name of a file. Each line of this file is
53 taken to be an exclude pattern</td>
54 <td valign="top" align="center">No</td>
55 </tr>
56 <tr>
57 <td valign="top">fromExtention</td>
58 <td valign="top">The string that files must end in to be renamed</td>
59 <td valign="top" align="center">Yes</td>
60 </tr>
61 <tr>
62 <td valign="top">includes</td>
63 <td valign="top">comma- or space-separated list of patterns of files that must be
64 included. All files are included when omitted.</td>
65 <td valign="top" align="center">No</td>
66 </tr>
67 <tr>
68 <td valign="top">includesfile</td>
69 <td valign="top">the name of a file. Each line of this file is
70 taken to be an include pattern</td>
71 <td valign="top" align="center">No</td>
72 </tr>
73 <tr>
74 <td valign="top">replace</td>
75 <td valign="top">Whether the file being renamed to should be
76 replaced if it already exists</td>
77 <td valign="top" align="center">No</td>
78 </tr>
79 <tr>
80 <td valign="top">srcDir</td>
81 <td valign="top">The starting directory for files to search in</td>
82 <td valign="top" align="center">Yes</td>
83 </tr>
84 <tr>
85 <td valign="top">toExtension</td>
86 <td valign="top">The string that renamed files will end with on
87 completion</td>
88 <td valign="top" align="center">Yes</td>
89 </tr>
90</table>
91<h3>Examples</h3>
92<blockquote>
93 <p><code>&lt;renameext srcDir=&quot;/source/project1&quot;
94 includes=&quot;**&quot;
95 excludes=&quot;**/samples/*&quot;
96 fromExtension=&quot;.java.keep&quot;
97 toExtension=&quot;.java&quot;
98 replace=&quot;true&quot;/&gt;
99</code>
100 </p>
101</blockquote>
102
103<hr>
104<p align="center">Copyright &copy; 2000-2002,2004 The Apache Software Foundation. All rights
105Reserved.</p>
106
107</body>
108</html>
109
Note: See TracBrowser for help on using the repository browser.