source: release-kits/lirk3/resources/gs3-release-maker/ant/docs/manual/api/org/apache/tools/ant/util/FileUtils.html@ 14982

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

initial import of LiRK3

File size: 81.0 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.4.2_13) on Mon Oct 01 14:33:34 NZST 2007 -->
6<TITLE>
7FileUtils (Apache Ant API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="org.apache.tools.ant.util.FileUtils class">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17 parent.document.title="FileUtils (Apache Ant API)";
18}
19</SCRIPT>
20
21</HEAD>
22
23<BODY BGCOLOR="white" onload="windowTitle();">
24
25
26<!-- ========= START OF TOP NAVBAR ======= -->
27<A NAME="navbar_top"><!-- --></A>
28<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
29<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
30<TR>
31<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
32<A NAME="navbar_top_firstrow"><!-- --></A>
33<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
34 <TR ALIGN="center" VALIGN="top">
35 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
36 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
37 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
42 </TR>
43</TABLE>
44</TD>
45<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
46</EM>
47</TD>
48</TR>
49
50<TR>
51<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
52&nbsp;<A HREF="../../../../../org/apache/tools/ant/util/DOMUtils.html" title="class in org.apache.tools.ant.util"><B>PREV CLASS</B></A>&nbsp;
53&nbsp;<A HREF="../../../../../org/apache/tools/ant/util/FlatFileNameMapper.html" title="class in org.apache.tools.ant.util"><B>NEXT CLASS</B></A></FONT></TD>
54<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
55 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
56&nbsp;<A HREF="FileUtils.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
57&nbsp;<SCRIPT type="text/javascript">
58 <!--
59 if(window==top) {
60 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
61 }
62 //-->
63</SCRIPT>
64<NOSCRIPT>
65 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
66</NOSCRIPT>
67
68</FONT></TD>
69</TR>
70<TR>
71<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
72 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
73<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
74DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
75</TR>
76</TABLE>
77<A NAME="skip-navbar_top"></A>
78<!-- ========= END OF TOP NAVBAR ========= -->
79
80<HR>
81<!-- ======== START OF CLASS DATA ======== -->
82<H2>
83<FONT SIZE="-1">
84org.apache.tools.ant.util</FONT>
85<BR>
86Class FileUtils</H2>
87<PRE>
88java.lang.Object
89 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.ant.util.FileUtils</B>
90</PRE>
91<HR>
92<DL>
93<DT>public class <B>FileUtils</B><DT>extends java.lang.Object</DL>
94
95<P>
96This class also encapsulates methods which allow Files to be
97 referred to using abstract path names which are translated to native
98 system file paths at runtime as well as copying files or setting
99 their last modification time.
100<P>
101
102<P>
103<HR>
104
105<P>
106<!-- ======== NESTED CLASS SUMMARY ======== -->
107
108
109<!-- =========== FIELD SUMMARY =========== -->
110
111<A NAME="field_summary"><!-- --></A>
112<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
113<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
114<TD COLSPAN=2><FONT SIZE="+2">
115<B>Field Summary</B></FONT></TD>
116</TR>
117<TR BGCOLOR="white" CLASS="TableRowColor">
118<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
119<CODE>static&nbsp;long</CODE></FONT></TD>
120<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#FAT_FILE_TIMESTAMP_GRANULARITY">FAT_FILE_TIMESTAMP_GRANULARITY</A></B></CODE>
121
122<BR>
123&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The granularity of timestamps under FAT.</TD>
124</TR>
125<TR BGCOLOR="white" CLASS="TableRowColor">
126<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
127<CODE>static&nbsp;long</CODE></FONT></TD>
128<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#UNIX_FILE_TIMESTAMP_GRANULARITY">UNIX_FILE_TIMESTAMP_GRANULARITY</A></B></CODE>
129
130<BR>
131&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The granularity of timestamps under Unix.</TD>
132</TR>
133</TABLE>
134&nbsp;
135<!-- ======== CONSTRUCTOR SUMMARY ======== -->
136
137<A NAME="constructor_summary"><!-- --></A>
138<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
139<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
140<TD COLSPAN=2><FONT SIZE="+2">
141<B>Constructor Summary</B></FONT></TD>
142</TR>
143<TR BGCOLOR="white" CLASS="TableRowColor">
144<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
145<CODE>protected </CODE></FONT></TD>
146<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#FileUtils()">FileUtils</A></B>()</CODE>
147
148<BR>
149&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Empty constructor.</TD>
150</TR>
151</TABLE>
152&nbsp;
153<!-- ========== METHOD SUMMARY =========== -->
154
155<A NAME="method_summary"><!-- --></A>
156<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
157<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
158<TD COLSPAN=2><FONT SIZE="+2">
159<B>Method Summary</B></FONT></TD>
160</TR>
161<TR BGCOLOR="white" CLASS="TableRowColor">
162<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
163<CODE>static&nbsp;void</CODE></FONT></TD>
164<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#close(java.io.InputStream)">close</A></B>(java.io.InputStream&nbsp;device)</CODE>
165
166<BR>
167&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Close a stream without throwing any exception if something went wrong.</TD>
168</TR>
169<TR BGCOLOR="white" CLASS="TableRowColor">
170<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
171<CODE>static&nbsp;void</CODE></FONT></TD>
172<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#close(java.io.OutputStream)">close</A></B>(java.io.OutputStream&nbsp;device)</CODE>
173
174<BR>
175&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Close a stream without throwing any exception if something went wrong.</TD>
176</TR>
177<TR BGCOLOR="white" CLASS="TableRowColor">
178<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
179<CODE>static&nbsp;void</CODE></FONT></TD>
180<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#close(java.io.Reader)">close</A></B>(java.io.Reader&nbsp;device)</CODE>
181
182<BR>
183&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Close a stream without throwing any exception if something went wrong.</TD>
184</TR>
185<TR BGCOLOR="white" CLASS="TableRowColor">
186<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
187<CODE>static&nbsp;void</CODE></FONT></TD>
188<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#close(java.io.Writer)">close</A></B>(java.io.Writer&nbsp;device)</CODE>
189
190<BR>
191&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Close a Writer without throwing any exception if something went wrong.</TD>
192</TR>
193<TR BGCOLOR="white" CLASS="TableRowColor">
194<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
195<CODE>&nbsp;boolean</CODE></FONT></TD>
196<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#contentEquals(java.io.File, java.io.File)">contentEquals</A></B>(java.io.File&nbsp;f1,
197 java.io.File&nbsp;f2)</CODE>
198
199<BR>
200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares the contents of two files.</TD>
201</TR>
202<TR BGCOLOR="white" CLASS="TableRowColor">
203<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
204<CODE>&nbsp;boolean</CODE></FONT></TD>
205<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#contentEquals(java.io.File, java.io.File, boolean)">contentEquals</A></B>(java.io.File&nbsp;f1,
206 java.io.File&nbsp;f2,
207 boolean&nbsp;textfile)</CODE>
208
209<BR>
210&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares the contents of two files.</TD>
211</TR>
212<TR BGCOLOR="white" CLASS="TableRowColor">
213<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
214<CODE>&nbsp;void</CODE></FONT></TD>
215<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#copyFile(java.io.File, java.io.File)">copyFile</A></B>(java.io.File&nbsp;sourceFile,
216 java.io.File&nbsp;destFile)</CODE>
217
218<BR>
219&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to copy a file from a source to a destination.</TD>
220</TR>
221<TR BGCOLOR="white" CLASS="TableRowColor">
222<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
223<CODE>&nbsp;void</CODE></FONT></TD>
224<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#copyFile(java.io.File, java.io.File, org.apache.tools.ant.types.FilterSetCollection)">copyFile</A></B>(java.io.File&nbsp;sourceFile,
225 java.io.File&nbsp;destFile,
226 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters)</CODE>
227
228<BR>
229&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to copy a file from a source to a destination
230 specifying if token filtering must be used.</TD>
231</TR>
232<TR BGCOLOR="white" CLASS="TableRowColor">
233<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
234<CODE>&nbsp;void</CODE></FONT></TD>
235<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#copyFile(java.io.File, java.io.File, org.apache.tools.ant.types.FilterSetCollection, boolean)">copyFile</A></B>(java.io.File&nbsp;sourceFile,
236 java.io.File&nbsp;destFile,
237 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
238 boolean&nbsp;overwrite)</CODE>
239
240<BR>
241&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to copy a file from a source to a
242 destination specifying if token filtering must be used and if
243 source files may overwrite newer destination files.</TD>
244</TR>
245<TR BGCOLOR="white" CLASS="TableRowColor">
246<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
247<CODE>&nbsp;void</CODE></FONT></TD>
248<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#copyFile(java.io.File, java.io.File, org.apache.tools.ant.types.FilterSetCollection, boolean, boolean)">copyFile</A></B>(java.io.File&nbsp;sourceFile,
249 java.io.File&nbsp;destFile,
250 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
251 boolean&nbsp;overwrite,
252 boolean&nbsp;preserveLastModified)</CODE>
253
254<BR>
255&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to copy a file from a source to a
256 destination specifying if token filtering must be used, if
257 source files may overwrite newer destination files and the
258 last modified time of <code>destFile</code> file should be made equal
259 to the last modified time of <code>sourceFile</code>.</TD>
260</TR>
261<TR BGCOLOR="white" CLASS="TableRowColor">
262<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
263<CODE>&nbsp;void</CODE></FONT></TD>
264<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#copyFile(java.io.File, java.io.File, org.apache.tools.ant.types.FilterSetCollection, boolean, boolean, java.lang.String)">copyFile</A></B>(java.io.File&nbsp;sourceFile,
265 java.io.File&nbsp;destFile,
266 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
267 boolean&nbsp;overwrite,
268 boolean&nbsp;preserveLastModified,
269 java.lang.String&nbsp;encoding)</CODE>
270
271<BR>
272&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to copy a file from a source to a
273 destination specifying if token filtering must be used, if
274 source files may overwrite newer destination files, the last
275 modified time of <code>destFile</code> file should be made
276 equal to the last modified time of <code>sourceFile</code> and
277 which character encoding to assume.</TD>
278</TR>
279<TR BGCOLOR="white" CLASS="TableRowColor">
280<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
281<CODE>&nbsp;void</CODE></FONT></TD>
282<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#copyFile(java.io.File, java.io.File, org.apache.tools.ant.types.FilterSetCollection, java.util.Vector, boolean, boolean, java.lang.String, org.apache.tools.ant.Project)">copyFile</A></B>(java.io.File&nbsp;sourceFile,
283 java.io.File&nbsp;destFile,
284 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
285 java.util.Vector&nbsp;filterChains,
286 boolean&nbsp;overwrite,
287 boolean&nbsp;preserveLastModified,
288 java.lang.String&nbsp;encoding,
289 <A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;project)</CODE>
290
291<BR>
292&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to copy a file from a source to a
293 destination specifying if token filtering must be used, if
294 filter chains must be used, if source files may overwrite
295 newer destination files and the last modified time of
296 <code>destFile</code> file should be made equal
297 to the last modified time of <code>sourceFile</code>.</TD>
298</TR>
299<TR BGCOLOR="white" CLASS="TableRowColor">
300<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
301<CODE>&nbsp;void</CODE></FONT></TD>
302<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#copyFile(java.io.File, java.io.File, org.apache.tools.ant.types.FilterSetCollection, java.util.Vector, boolean, boolean, java.lang.String, java.lang.String, org.apache.tools.ant.Project)">copyFile</A></B>(java.io.File&nbsp;sourceFile,
303 java.io.File&nbsp;destFile,
304 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
305 java.util.Vector&nbsp;filterChains,
306 boolean&nbsp;overwrite,
307 boolean&nbsp;preserveLastModified,
308 java.lang.String&nbsp;inputEncoding,
309 java.lang.String&nbsp;outputEncoding,
310 <A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;project)</CODE>
311
312<BR>
313&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to copy a file from a source to a
314 destination specifying if token filtering must be used, if
315 filter chains must be used, if source files may overwrite
316 newer destination files and the last modified time of
317 <code>destFile</code> file should be made equal
318 to the last modified time of <code>sourceFile</code>.</TD>
319</TR>
320<TR BGCOLOR="white" CLASS="TableRowColor">
321<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
322<CODE>&nbsp;void</CODE></FONT></TD>
323<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#copyFile(java.lang.String, java.lang.String)">copyFile</A></B>(java.lang.String&nbsp;sourceFile,
324 java.lang.String&nbsp;destFile)</CODE>
325
326<BR>
327&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to copy a file from a source to a destination.</TD>
328</TR>
329<TR BGCOLOR="white" CLASS="TableRowColor">
330<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
331<CODE>&nbsp;void</CODE></FONT></TD>
332<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#copyFile(java.lang.String, java.lang.String, org.apache.tools.ant.types.FilterSetCollection)">copyFile</A></B>(java.lang.String&nbsp;sourceFile,
333 java.lang.String&nbsp;destFile,
334 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters)</CODE>
335
336<BR>
337&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to copy a file from a source to a destination
338 specifying if token filtering must be used.</TD>
339</TR>
340<TR BGCOLOR="white" CLASS="TableRowColor">
341<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
342<CODE>&nbsp;void</CODE></FONT></TD>
343<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#copyFile(java.lang.String, java.lang.String, org.apache.tools.ant.types.FilterSetCollection, boolean)">copyFile</A></B>(java.lang.String&nbsp;sourceFile,
344 java.lang.String&nbsp;destFile,
345 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
346 boolean&nbsp;overwrite)</CODE>
347
348<BR>
349&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to copy a file from a source to a
350 destination specifying if token filtering must be used and if
351 source files may overwrite newer destination files.</TD>
352</TR>
353<TR BGCOLOR="white" CLASS="TableRowColor">
354<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
355<CODE>&nbsp;void</CODE></FONT></TD>
356<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#copyFile(java.lang.String, java.lang.String, org.apache.tools.ant.types.FilterSetCollection, boolean, boolean)">copyFile</A></B>(java.lang.String&nbsp;sourceFile,
357 java.lang.String&nbsp;destFile,
358 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
359 boolean&nbsp;overwrite,
360 boolean&nbsp;preserveLastModified)</CODE>
361
362<BR>
363&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to copy a file from a source to a
364 destination specifying if token filtering must be used, if
365 source files may overwrite newer destination files and the
366 last modified time of <code>destFile</code> file should be made equal
367 to the last modified time of <code>sourceFile</code>.</TD>
368</TR>
369<TR BGCOLOR="white" CLASS="TableRowColor">
370<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
371<CODE>&nbsp;void</CODE></FONT></TD>
372<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#copyFile(java.lang.String, java.lang.String, org.apache.tools.ant.types.FilterSetCollection, boolean, boolean, java.lang.String)">copyFile</A></B>(java.lang.String&nbsp;sourceFile,
373 java.lang.String&nbsp;destFile,
374 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
375 boolean&nbsp;overwrite,
376 boolean&nbsp;preserveLastModified,
377 java.lang.String&nbsp;encoding)</CODE>
378
379<BR>
380&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to copy a file from a source to a
381 destination specifying if token filtering must be used, if
382 source files may overwrite newer destination files and the
383 last modified time of <code>destFile</code> file should be made equal
384 to the last modified time of <code>sourceFile</code>.</TD>
385</TR>
386<TR BGCOLOR="white" CLASS="TableRowColor">
387<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
388<CODE>&nbsp;void</CODE></FONT></TD>
389<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#copyFile(java.lang.String, java.lang.String, org.apache.tools.ant.types.FilterSetCollection, java.util.Vector, boolean, boolean, java.lang.String, org.apache.tools.ant.Project)">copyFile</A></B>(java.lang.String&nbsp;sourceFile,
390 java.lang.String&nbsp;destFile,
391 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
392 java.util.Vector&nbsp;filterChains,
393 boolean&nbsp;overwrite,
394 boolean&nbsp;preserveLastModified,
395 java.lang.String&nbsp;encoding,
396 <A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;project)</CODE>
397
398<BR>
399&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to copy a file from a source to a
400 destination specifying if token filtering must be used, if
401 filter chains must be used, if source files may overwrite
402 newer destination files and the last modified time of
403 <code>destFile</code> file should be made equal
404 to the last modified time of <code>sourceFile</code>.</TD>
405</TR>
406<TR BGCOLOR="white" CLASS="TableRowColor">
407<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
408<CODE>&nbsp;void</CODE></FONT></TD>
409<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#copyFile(java.lang.String, java.lang.String, org.apache.tools.ant.types.FilterSetCollection, java.util.Vector, boolean, boolean, java.lang.String, java.lang.String, org.apache.tools.ant.Project)">copyFile</A></B>(java.lang.String&nbsp;sourceFile,
410 java.lang.String&nbsp;destFile,
411 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
412 java.util.Vector&nbsp;filterChains,
413 boolean&nbsp;overwrite,
414 boolean&nbsp;preserveLastModified,
415 java.lang.String&nbsp;inputEncoding,
416 java.lang.String&nbsp;outputEncoding,
417 <A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;project)</CODE>
418
419<BR>
420&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to copy a file from a source to a
421 destination specifying if token filtering must be used, if
422 filter chains must be used, if source files may overwrite
423 newer destination files and the last modified time of
424 <code>destFile</code> file should be made equal
425 to the last modified time of <code>sourceFile</code>.</TD>
426</TR>
427<TR BGCOLOR="white" CLASS="TableRowColor">
428<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
429<CODE>&nbsp;boolean</CODE></FONT></TD>
430<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#createNewFile(java.io.File)">createNewFile</A></B>(java.io.File&nbsp;f)</CODE>
431
432<BR>
433&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This was originally an emulation of File.createNewFile for JDK 1.1,
434 but it is now implemented using that method (Ant 1.6.3 onwards).</TD>
435</TR>
436<TR BGCOLOR="white" CLASS="TableRowColor">
437<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
438<CODE>&nbsp;boolean</CODE></FONT></TD>
439<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#createNewFile(java.io.File, boolean)">createNewFile</A></B>(java.io.File&nbsp;f,
440 boolean&nbsp;mkdirs)</CODE>
441
442<BR>
443&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new file, optionally creating parent directories.</TD>
444</TR>
445<TR BGCOLOR="white" CLASS="TableRowColor">
446<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
447<CODE>&nbsp;java.io.File</CODE></FONT></TD>
448<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#createTempFile(java.lang.String, java.lang.String, java.io.File)">createTempFile</A></B>(java.lang.String&nbsp;prefix,
449 java.lang.String&nbsp;suffix,
450 java.io.File&nbsp;parentDir)</CODE>
451
452<BR>
453&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a temporary file in a given directory.</TD>
454</TR>
455<TR BGCOLOR="white" CLASS="TableRowColor">
456<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
457<CODE>static&nbsp;void</CODE></FONT></TD>
458<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#delete(java.io.File)">delete</A></B>(java.io.File&nbsp;file)</CODE>
459
460<BR>
461&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete the file with <CODE>File.delete()</CODE> if the argument is not null.</TD>
462</TR>
463<TR BGCOLOR="white" CLASS="TableRowColor">
464<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
465<CODE>&nbsp;boolean</CODE></FONT></TD>
466<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#fileNameEquals(java.io.File, java.io.File)">fileNameEquals</A></B>(java.io.File&nbsp;f1,
467 java.io.File&nbsp;f2)</CODE>
468
469<BR>
470&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares two filenames.</TD>
471</TR>
472<TR BGCOLOR="white" CLASS="TableRowColor">
473<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
474<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
475<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#fromURI(java.lang.String)">fromURI</A></B>(java.lang.String&nbsp;uri)</CODE>
476
477<BR>
478&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a file path from a <code>file:</code> URI.</TD>
479</TR>
480<TR BGCOLOR="white" CLASS="TableRowColor">
481<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
482<CODE>&nbsp;long</CODE></FONT></TD>
483<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#getFileTimestampGranularity()">getFileTimestampGranularity</A></B>()</CODE>
484
485<BR>
486&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the granularity of file timestamps.</TD>
487</TR>
488<TR BGCOLOR="white" CLASS="TableRowColor">
489<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
490<CODE>&nbsp;java.net.URL</CODE></FONT></TD>
491<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#getFileURL(java.io.File)">getFileURL</A></B>(java.io.File&nbsp;file)</CODE>
492
493<BR>
494&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the URL for a file taking into account # characters.</TD>
495</TR>
496<TR BGCOLOR="white" CLASS="TableRowColor">
497<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
498<CODE>static&nbsp;<A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html" title="class in org.apache.tools.ant.util">FileUtils</A></CODE></FONT></TD>
499<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#getFileUtils()">getFileUtils</A></B>()</CODE>
500
501<BR>
502&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to retrieve The FileUtils, which is shared by all users of this
503 method.</TD>
504</TR>
505<TR BGCOLOR="white" CLASS="TableRowColor">
506<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
507<CODE>&nbsp;java.io.File</CODE></FONT></TD>
508<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#getParentFile(java.io.File)">getParentFile</A></B>(java.io.File&nbsp;f)</CODE>
509
510<BR>
511&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This was originally an emulation of <CODE>File.getParentFile()</CODE> for JDK 1.1,
512 but it is now implemented using that method (Ant 1.6.3 onwards).</TD>
513</TR>
514<TR BGCOLOR="white" CLASS="TableRowColor">
515<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
516<CODE>static&nbsp;boolean</CODE></FONT></TD>
517<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#isAbsolutePath(java.lang.String)">isAbsolutePath</A></B>(java.lang.String&nbsp;filename)</CODE>
518
519<BR>
520&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Verifies that the specified filename represents an absolute path.</TD>
521</TR>
522<TR BGCOLOR="white" CLASS="TableRowColor">
523<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
524<CODE>&nbsp;boolean</CODE></FONT></TD>
525<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#isSymbolicLink(java.io.File, java.lang.String)">isSymbolicLink</A></B>(java.io.File&nbsp;parent,
526 java.lang.String&nbsp;name)</CODE>
527
528<BR>
529&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether a given file is a symbolic link.</TD>
530</TR>
531<TR BGCOLOR="white" CLASS="TableRowColor">
532<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
533<CODE>&nbsp;boolean</CODE></FONT></TD>
534<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#isUpToDate(java.io.File, java.io.File)">isUpToDate</A></B>(java.io.File&nbsp;source,
535 java.io.File&nbsp;dest)</CODE>
536
537<BR>
538&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the source is older than the dest.</TD>
539</TR>
540<TR BGCOLOR="white" CLASS="TableRowColor">
541<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
542<CODE>&nbsp;boolean</CODE></FONT></TD>
543<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#isUpToDate(java.io.File, java.io.File, long)">isUpToDate</A></B>(java.io.File&nbsp;source,
544 java.io.File&nbsp;dest,
545 long&nbsp;granularity)</CODE>
546
547<BR>
548&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the source is older than the dest.</TD>
549</TR>
550<TR BGCOLOR="white" CLASS="TableRowColor">
551<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
552<CODE>&nbsp;boolean</CODE></FONT></TD>
553<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#isUpToDate(long, long)">isUpToDate</A></B>(long&nbsp;sourceTime,
554 long&nbsp;destTime)</CODE>
555
556<BR>
557&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compare two timestamps for being up to date using the
558 current granularity.</TD>
559</TR>
560<TR BGCOLOR="white" CLASS="TableRowColor">
561<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
562<CODE>&nbsp;boolean</CODE></FONT></TD>
563<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#isUpToDate(long, long, long)">isUpToDate</A></B>(long&nbsp;sourceTime,
564 long&nbsp;destTime,
565 long&nbsp;granularity)</CODE>
566
567<BR>
568&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compare two timestamps for being up to date using
569 the specified granularity.</TD>
570</TR>
571<TR BGCOLOR="white" CLASS="TableRowColor">
572<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
573<CODE>static&nbsp;<A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html" title="class in org.apache.tools.ant.util">FileUtils</A></CODE></FONT></TD>
574<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#newFileUtils()">newFileUtils</A></B>()</CODE>
575
576<BR>
577&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Factory method.</TD>
578</TR>
579<TR BGCOLOR="white" CLASS="TableRowColor">
580<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
581<CODE>&nbsp;java.io.File</CODE></FONT></TD>
582<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#normalize(java.lang.String)">normalize</A></B>(java.lang.String&nbsp;path)</CODE>
583
584<BR>
585&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Normalize&quot; the given absolute path.</TD>
586</TR>
587<TR BGCOLOR="white" CLASS="TableRowColor">
588<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
589<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
590<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#readFully(java.io.Reader)">readFully</A></B>(java.io.Reader&nbsp;rdr)</CODE>
591
592<BR>
593&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read from reader till EOF.</TD>
594</TR>
595<TR BGCOLOR="white" CLASS="TableRowColor">
596<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
597<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
598<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#readFully(java.io.Reader, int)">readFully</A></B>(java.io.Reader&nbsp;rdr,
599 int&nbsp;bufferSize)</CODE>
600
601<BR>
602&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read from reader till EOF.</TD>
603</TR>
604<TR BGCOLOR="white" CLASS="TableRowColor">
605<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
606<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
607<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#removeLeadingPath(java.io.File, java.io.File)">removeLeadingPath</A></B>(java.io.File&nbsp;leading,
608 java.io.File&nbsp;path)</CODE>
609
610<BR>
611&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a leading path from a second path.</TD>
612</TR>
613<TR BGCOLOR="white" CLASS="TableRowColor">
614<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
615<CODE>&nbsp;void</CODE></FONT></TD>
616<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#rename(java.io.File, java.io.File)">rename</A></B>(java.io.File&nbsp;from,
617 java.io.File&nbsp;to)</CODE>
618
619<BR>
620&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Renames a file, even if that involves crossing file system boundaries.</TD>
621</TR>
622<TR BGCOLOR="white" CLASS="TableRowColor">
623<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
624<CODE>&nbsp;java.io.File</CODE></FONT></TD>
625<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#resolveFile(java.io.File, java.lang.String)">resolveFile</A></B>(java.io.File&nbsp;file,
626 java.lang.String&nbsp;filename)</CODE>
627
628<BR>
629&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interpret the filename as a file relative to the given file
630 unless the filename already represents an absolute filename.</TD>
631</TR>
632<TR BGCOLOR="white" CLASS="TableRowColor">
633<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
634<CODE>&nbsp;void</CODE></FONT></TD>
635<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#setFileLastModified(java.io.File, long)">setFileLastModified</A></B>(java.io.File&nbsp;file,
636 long&nbsp;time)</CODE>
637
638<BR>
639&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calls File.setLastModified(long time).</TD>
640</TR>
641<TR BGCOLOR="white" CLASS="TableRowColor">
642<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
643<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
644<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#toURI(java.lang.String)">toURI</A></B>(java.lang.String&nbsp;path)</CODE>
645
646<BR>
647&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a <code>file:</code> URI that represents the
648 external form of the given pathname.</TD>
649</TR>
650<TR BGCOLOR="white" CLASS="TableRowColor">
651<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
652<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
653<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html#toVMSPath(java.io.File)">toVMSPath</A></B>(java.io.File&nbsp;f)</CODE>
654
655<BR>
656&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a VMS String representation of a <code>File</code> object.</TD>
657</TR>
658</TABLE>
659&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
660<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
661<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
662<TD><B>Methods inherited from class java.lang.Object</B></TD>
663</TR>
664<TR BGCOLOR="white" CLASS="TableRowColor">
665<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
666</TR>
667</TABLE>
668&nbsp;
669<P>
670
671<!-- ============ FIELD DETAIL =========== -->
672
673<A NAME="field_detail"><!-- --></A>
674<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
675<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
676<TD COLSPAN=1><FONT SIZE="+2">
677<B>Field Detail</B></FONT></TD>
678</TR>
679</TABLE>
680
681<A NAME="FAT_FILE_TIMESTAMP_GRANULARITY"><!-- --></A><H3>
682FAT_FILE_TIMESTAMP_GRANULARITY</H3>
683<PRE>
684public static final long <B>FAT_FILE_TIMESTAMP_GRANULARITY</B></PRE>
685<DL>
686<DD>The granularity of timestamps under FAT.
687<P>
688<DL>
689<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.tools.ant.util.FileUtils.FAT_FILE_TIMESTAMP_GRANULARITY">Constant Field Values</A></DL>
690</DL>
691<HR>
692
693<A NAME="UNIX_FILE_TIMESTAMP_GRANULARITY"><!-- --></A><H3>
694UNIX_FILE_TIMESTAMP_GRANULARITY</H3>
695<PRE>
696public static final long <B>UNIX_FILE_TIMESTAMP_GRANULARITY</B></PRE>
697<DL>
698<DD>The granularity of timestamps under Unix.
699<P>
700<DL>
701<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.tools.ant.util.FileUtils.UNIX_FILE_TIMESTAMP_GRANULARITY">Constant Field Values</A></DL>
702</DL>
703
704<!-- ========= CONSTRUCTOR DETAIL ======== -->
705
706<A NAME="constructor_detail"><!-- --></A>
707<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
708<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
709<TD COLSPAN=1><FONT SIZE="+2">
710<B>Constructor Detail</B></FONT></TD>
711</TR>
712</TABLE>
713
714<A NAME="FileUtils()"><!-- --></A><H3>
715FileUtils</H3>
716<PRE>
717protected <B>FileUtils</B>()</PRE>
718<DL>
719<DD>Empty constructor.
720<P>
721</DL>
722
723<!-- ============ METHOD DETAIL ========== -->
724
725<A NAME="method_detail"><!-- --></A>
726<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
727<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
728<TD COLSPAN=1><FONT SIZE="+2">
729<B>Method Detail</B></FONT></TD>
730</TR>
731</TABLE>
732
733<A NAME="newFileUtils()"><!-- --></A><H3>
734newFileUtils</H3>
735<PRE>
736public static <A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html" title="class in org.apache.tools.ant.util">FileUtils</A> <B>newFileUtils</B>()</PRE>
737<DL>
738<DD>Factory method.
739<P>
740<DD><DL>
741
742<DT><B>Returns:</B><DD>a new instance of FileUtils.</DL>
743</DD>
744</DL>
745<HR>
746
747<A NAME="getFileUtils()"><!-- --></A><H3>
748getFileUtils</H3>
749<PRE>
750public static <A HREF="../../../../../org/apache/tools/ant/util/FileUtils.html" title="class in org.apache.tools.ant.util">FileUtils</A> <B>getFileUtils</B>()</PRE>
751<DL>
752<DD>Method to retrieve The FileUtils, which is shared by all users of this
753 method.
754<P>
755<DD><DL>
756
757<DT><B>Returns:</B><DD>an instance of FileUtils.<DT><B>Since:</B></DT>
758 <DD>Ant 1.6.3</DD>
759</DL>
760</DD>
761</DL>
762<HR>
763
764<A NAME="getFileURL(java.io.File)"><!-- --></A><H3>
765getFileURL</H3>
766<PRE>
767public java.net.URL <B>getFileURL</B>(java.io.File&nbsp;file)
768 throws java.net.MalformedURLException</PRE>
769<DL>
770<DD>Get the URL for a file taking into account # characters.
771<P>
772<DD><DL>
773<DT><B>Parameters:</B><DD><CODE>file</CODE> - the file whose URL representation is required.
774<DT><B>Returns:</B><DD>The FileURL value.
775<DT><B>Throws:</B>
776<DD><CODE>java.net.MalformedURLException</CODE> - if the URL representation cannot be
777 formed.</DL>
778</DD>
779</DL>
780<HR>
781
782<A NAME="copyFile(java.lang.String, java.lang.String)"><!-- --></A><H3>
783copyFile</H3>
784<PRE>
785public void <B>copyFile</B>(java.lang.String&nbsp;sourceFile,
786 java.lang.String&nbsp;destFile)
787 throws java.io.IOException</PRE>
788<DL>
789<DD>Convenience method to copy a file from a source to a destination.
790 No filtering is performed.
791<P>
792<DD><DL>
793<DT><B>Parameters:</B><DD><CODE>sourceFile</CODE> - Name of file to copy from.
794 Must not be <code>null</code>.<DD><CODE>destFile</CODE> - Name of file to copy to.
795 Must not be <code>null</code>.
796<DT><B>Throws:</B>
797<DD><CODE>java.io.IOException</CODE> - if the copying fails.</DL>
798</DD>
799</DL>
800<HR>
801
802<A NAME="copyFile(java.lang.String, java.lang.String, org.apache.tools.ant.types.FilterSetCollection)"><!-- --></A><H3>
803copyFile</H3>
804<PRE>
805public void <B>copyFile</B>(java.lang.String&nbsp;sourceFile,
806 java.lang.String&nbsp;destFile,
807 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters)
808 throws java.io.IOException</PRE>
809<DL>
810<DD>Convenience method to copy a file from a source to a destination
811 specifying if token filtering must be used.
812<P>
813<DD><DL>
814<DT><B>Parameters:</B><DD><CODE>sourceFile</CODE> - Name of file to copy from.
815 Must not be <code>null</code>.<DD><CODE>destFile</CODE> - Name of file to copy to.
816 Must not be <code>null</code>.<DD><CODE>filters</CODE> - the collection of filters to apply to this copy.
817<DT><B>Throws:</B>
818<DD><CODE>java.io.IOException</CODE> - if the copying fails.</DL>
819</DD>
820</DL>
821<HR>
822
823<A NAME="copyFile(java.lang.String, java.lang.String, org.apache.tools.ant.types.FilterSetCollection, boolean)"><!-- --></A><H3>
824copyFile</H3>
825<PRE>
826public void <B>copyFile</B>(java.lang.String&nbsp;sourceFile,
827 java.lang.String&nbsp;destFile,
828 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
829 boolean&nbsp;overwrite)
830 throws java.io.IOException</PRE>
831<DL>
832<DD>Convenience method to copy a file from a source to a
833 destination specifying if token filtering must be used and if
834 source files may overwrite newer destination files.
835<P>
836<DD><DL>
837<DT><B>Parameters:</B><DD><CODE>sourceFile</CODE> - Name of file to copy from.
838 Must not be <code>null</code>.<DD><CODE>destFile</CODE> - Name of file to copy to.
839 Must not be <code>null</code>.<DD><CODE>filters</CODE> - the collection of filters to apply to this copy.<DD><CODE>overwrite</CODE> - Whether or not the destination file should be
840 overwritten if it already exists.
841<DT><B>Throws:</B>
842<DD><CODE>java.io.IOException</CODE> - if the copying fails.</DL>
843</DD>
844</DL>
845<HR>
846
847<A NAME="copyFile(java.lang.String, java.lang.String, org.apache.tools.ant.types.FilterSetCollection, boolean, boolean)"><!-- --></A><H3>
848copyFile</H3>
849<PRE>
850public void <B>copyFile</B>(java.lang.String&nbsp;sourceFile,
851 java.lang.String&nbsp;destFile,
852 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
853 boolean&nbsp;overwrite,
854 boolean&nbsp;preserveLastModified)
855 throws java.io.IOException</PRE>
856<DL>
857<DD>Convenience method to copy a file from a source to a
858 destination specifying if token filtering must be used, if
859 source files may overwrite newer destination files and the
860 last modified time of <code>destFile</code> file should be made equal
861 to the last modified time of <code>sourceFile</code>.
862<P>
863<DD><DL>
864<DT><B>Parameters:</B><DD><CODE>sourceFile</CODE> - Name of file to copy from.
865 Must not be <code>null</code>.<DD><CODE>destFile</CODE> - Name of file to copy to.
866 Must not be <code>null</code>.<DD><CODE>filters</CODE> - the collection of filters to apply to this copy.<DD><CODE>overwrite</CODE> - Whether or not the destination file should be
867 overwritten if it already exists.<DD><CODE>preserveLastModified</CODE> - Whether or not the last modified time of
868 the resulting file should be set to that
869 of the source file.
870<DT><B>Throws:</B>
871<DD><CODE>java.io.IOException</CODE> - if the copying fails.</DL>
872</DD>
873</DL>
874<HR>
875
876<A NAME="copyFile(java.lang.String, java.lang.String, org.apache.tools.ant.types.FilterSetCollection, boolean, boolean, java.lang.String)"><!-- --></A><H3>
877copyFile</H3>
878<PRE>
879public void <B>copyFile</B>(java.lang.String&nbsp;sourceFile,
880 java.lang.String&nbsp;destFile,
881 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
882 boolean&nbsp;overwrite,
883 boolean&nbsp;preserveLastModified,
884 java.lang.String&nbsp;encoding)
885 throws java.io.IOException</PRE>
886<DL>
887<DD>Convenience method to copy a file from a source to a
888 destination specifying if token filtering must be used, if
889 source files may overwrite newer destination files and the
890 last modified time of <code>destFile</code> file should be made equal
891 to the last modified time of <code>sourceFile</code>.
892<P>
893<DD><DL>
894<DT><B>Parameters:</B><DD><CODE>sourceFile</CODE> - Name of file to copy from.
895 Must not be <code>null</code>.<DD><CODE>destFile</CODE> - Name of file to copy to.
896 Must not be <code>null</code>.<DD><CODE>filters</CODE> - the collection of filters to apply to this copy.<DD><CODE>overwrite</CODE> - Whether or not the destination file should be
897 overwritten if it already exists.<DD><CODE>preserveLastModified</CODE> - Whether or not the last modified time of
898 the resulting file should be set to that
899 of the source file.<DD><CODE>encoding</CODE> - the encoding used to read and write the files.
900<DT><B>Throws:</B>
901<DD><CODE>java.io.IOException</CODE> - if the copying fails.<DT><B>Since:</B></DT>
902 <DD>Ant 1.5</DD>
903</DL>
904</DD>
905</DL>
906<HR>
907
908<A NAME="copyFile(java.lang.String, java.lang.String, org.apache.tools.ant.types.FilterSetCollection, java.util.Vector, boolean, boolean, java.lang.String, org.apache.tools.ant.Project)"><!-- --></A><H3>
909copyFile</H3>
910<PRE>
911public void <B>copyFile</B>(java.lang.String&nbsp;sourceFile,
912 java.lang.String&nbsp;destFile,
913 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
914 java.util.Vector&nbsp;filterChains,
915 boolean&nbsp;overwrite,
916 boolean&nbsp;preserveLastModified,
917 java.lang.String&nbsp;encoding,
918 <A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;project)
919 throws java.io.IOException</PRE>
920<DL>
921<DD>Convenience method to copy a file from a source to a
922 destination specifying if token filtering must be used, if
923 filter chains must be used, if source files may overwrite
924 newer destination files and the last modified time of
925 <code>destFile</code> file should be made equal
926 to the last modified time of <code>sourceFile</code>.
927<P>
928<DD><DL>
929<DT><B>Parameters:</B><DD><CODE>sourceFile</CODE> - Name of file to copy from.
930 Must not be <code>null</code>.<DD><CODE>destFile</CODE> - Name of file to copy to.
931 Must not be <code>null</code>.<DD><CODE>filters</CODE> - the collection of filters to apply to this copy.<DD><CODE>filterChains</CODE> - filterChains to apply during the copy.<DD><CODE>overwrite</CODE> - Whether or not the destination file should be
932 overwritten if it already exists.<DD><CODE>preserveLastModified</CODE> - Whether or not the last modified time of
933 the resulting file should be set to that
934 of the source file.<DD><CODE>encoding</CODE> - the encoding used to read and write the files.<DD><CODE>project</CODE> - the project instance.
935<DT><B>Throws:</B>
936<DD><CODE>java.io.IOException</CODE> - if the copying fails.<DT><B>Since:</B></DT>
937 <DD>Ant 1.5</DD>
938</DL>
939</DD>
940</DL>
941<HR>
942
943<A NAME="copyFile(java.lang.String, java.lang.String, org.apache.tools.ant.types.FilterSetCollection, java.util.Vector, boolean, boolean, java.lang.String, java.lang.String, org.apache.tools.ant.Project)"><!-- --></A><H3>
944copyFile</H3>
945<PRE>
946public void <B>copyFile</B>(java.lang.String&nbsp;sourceFile,
947 java.lang.String&nbsp;destFile,
948 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
949 java.util.Vector&nbsp;filterChains,
950 boolean&nbsp;overwrite,
951 boolean&nbsp;preserveLastModified,
952 java.lang.String&nbsp;inputEncoding,
953 java.lang.String&nbsp;outputEncoding,
954 <A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;project)
955 throws java.io.IOException</PRE>
956<DL>
957<DD>Convenience method to copy a file from a source to a
958 destination specifying if token filtering must be used, if
959 filter chains must be used, if source files may overwrite
960 newer destination files and the last modified time of
961 <code>destFile</code> file should be made equal
962 to the last modified time of <code>sourceFile</code>.
963<P>
964<DD><DL>
965<DT><B>Parameters:</B><DD><CODE>sourceFile</CODE> - Name of file to copy from.
966 Must not be <code>null</code>.<DD><CODE>destFile</CODE> - Name of file to copy to.
967 Must not be <code>null</code>.<DD><CODE>filters</CODE> - the collection of filters to apply to this copy.<DD><CODE>filterChains</CODE> - filterChains to apply during the copy.<DD><CODE>overwrite</CODE> - Whether or not the destination file should be
968 overwritten if it already exists.<DD><CODE>preserveLastModified</CODE> - Whether or not the last modified time of
969 the resulting file should be set to that
970 of the source file.<DD><CODE>inputEncoding</CODE> - the encoding used to read the files.<DD><CODE>outputEncoding</CODE> - the encoding used to write the files.<DD><CODE>project</CODE> - the project instance.
971<DT><B>Throws:</B>
972<DD><CODE>java.io.IOException</CODE> - if the copying fails.<DT><B>Since:</B></DT>
973 <DD>Ant 1.6</DD>
974</DL>
975</DD>
976</DL>
977<HR>
978
979<A NAME="copyFile(java.io.File, java.io.File)"><!-- --></A><H3>
980copyFile</H3>
981<PRE>
982public void <B>copyFile</B>(java.io.File&nbsp;sourceFile,
983 java.io.File&nbsp;destFile)
984 throws java.io.IOException</PRE>
985<DL>
986<DD>Convenience method to copy a file from a source to a destination.
987 No filtering is performed.
988<P>
989<DD><DL>
990<DT><B>Parameters:</B><DD><CODE>sourceFile</CODE> - the file to copy from.
991 Must not be <code>null</code>.<DD><CODE>destFile</CODE> - the file to copy to.
992 Must not be <code>null</code>.
993<DT><B>Throws:</B>
994<DD><CODE>java.io.IOException</CODE> - if the copying fails.</DL>
995</DD>
996</DL>
997<HR>
998
999<A NAME="copyFile(java.io.File, java.io.File, org.apache.tools.ant.types.FilterSetCollection)"><!-- --></A><H3>
1000copyFile</H3>
1001<PRE>
1002public void <B>copyFile</B>(java.io.File&nbsp;sourceFile,
1003 java.io.File&nbsp;destFile,
1004 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters)
1005 throws java.io.IOException</PRE>
1006<DL>
1007<DD>Convenience method to copy a file from a source to a destination
1008 specifying if token filtering must be used.
1009<P>
1010<DD><DL>
1011<DT><B>Parameters:</B><DD><CODE>sourceFile</CODE> - the file to copy from.
1012 Must not be <code>null</code>.<DD><CODE>destFile</CODE> - the file to copy to.
1013 Must not be <code>null</code>.<DD><CODE>filters</CODE> - the collection of filters to apply to this copy.
1014<DT><B>Throws:</B>
1015<DD><CODE>java.io.IOException</CODE> - if the copying fails.</DL>
1016</DD>
1017</DL>
1018<HR>
1019
1020<A NAME="copyFile(java.io.File, java.io.File, org.apache.tools.ant.types.FilterSetCollection, boolean)"><!-- --></A><H3>
1021copyFile</H3>
1022<PRE>
1023public void <B>copyFile</B>(java.io.File&nbsp;sourceFile,
1024 java.io.File&nbsp;destFile,
1025 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
1026 boolean&nbsp;overwrite)
1027 throws java.io.IOException</PRE>
1028<DL>
1029<DD>Convenience method to copy a file from a source to a
1030 destination specifying if token filtering must be used and if
1031 source files may overwrite newer destination files.
1032<P>
1033<DD><DL>
1034<DT><B>Parameters:</B><DD><CODE>sourceFile</CODE> - the file to copy from.
1035 Must not be <code>null</code>.<DD><CODE>destFile</CODE> - the file to copy to.
1036 Must not be <code>null</code>.<DD><CODE>filters</CODE> - the collection of filters to apply to this copy.<DD><CODE>overwrite</CODE> - Whether or not the destination file should be
1037 overwritten if it already exists.
1038<DT><B>Throws:</B>
1039<DD><CODE>java.io.IOException</CODE> - if the copying fails.</DL>
1040</DD>
1041</DL>
1042<HR>
1043
1044<A NAME="copyFile(java.io.File, java.io.File, org.apache.tools.ant.types.FilterSetCollection, boolean, boolean)"><!-- --></A><H3>
1045copyFile</H3>
1046<PRE>
1047public void <B>copyFile</B>(java.io.File&nbsp;sourceFile,
1048 java.io.File&nbsp;destFile,
1049 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
1050 boolean&nbsp;overwrite,
1051 boolean&nbsp;preserveLastModified)
1052 throws java.io.IOException</PRE>
1053<DL>
1054<DD>Convenience method to copy a file from a source to a
1055 destination specifying if token filtering must be used, if
1056 source files may overwrite newer destination files and the
1057 last modified time of <code>destFile</code> file should be made equal
1058 to the last modified time of <code>sourceFile</code>.
1059<P>
1060<DD><DL>
1061<DT><B>Parameters:</B><DD><CODE>sourceFile</CODE> - the file to copy from.
1062 Must not be <code>null</code>.<DD><CODE>destFile</CODE> - the file to copy to.
1063 Must not be <code>null</code>.<DD><CODE>filters</CODE> - the collection of filters to apply to this copy.<DD><CODE>overwrite</CODE> - Whether or not the destination file should be
1064 overwritten if it already exists.<DD><CODE>preserveLastModified</CODE> - Whether or not the last modified time of
1065 the resulting file should be set to that
1066 of the source file.
1067<DT><B>Throws:</B>
1068<DD><CODE>java.io.IOException</CODE> - if the copying fails.</DL>
1069</DD>
1070</DL>
1071<HR>
1072
1073<A NAME="copyFile(java.io.File, java.io.File, org.apache.tools.ant.types.FilterSetCollection, boolean, boolean, java.lang.String)"><!-- --></A><H3>
1074copyFile</H3>
1075<PRE>
1076public void <B>copyFile</B>(java.io.File&nbsp;sourceFile,
1077 java.io.File&nbsp;destFile,
1078 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
1079 boolean&nbsp;overwrite,
1080 boolean&nbsp;preserveLastModified,
1081 java.lang.String&nbsp;encoding)
1082 throws java.io.IOException</PRE>
1083<DL>
1084<DD>Convenience method to copy a file from a source to a
1085 destination specifying if token filtering must be used, if
1086 source files may overwrite newer destination files, the last
1087 modified time of <code>destFile</code> file should be made
1088 equal to the last modified time of <code>sourceFile</code> and
1089 which character encoding to assume.
1090<P>
1091<DD><DL>
1092<DT><B>Parameters:</B><DD><CODE>sourceFile</CODE> - the file to copy from.
1093 Must not be <code>null</code>.<DD><CODE>destFile</CODE> - the file to copy to.
1094 Must not be <code>null</code>.<DD><CODE>filters</CODE> - the collection of filters to apply to this copy.<DD><CODE>overwrite</CODE> - Whether or not the destination file should be
1095 overwritten if it already exists.<DD><CODE>preserveLastModified</CODE> - Whether or not the last modified time of
1096 the resulting file should be set to that
1097 of the source file.<DD><CODE>encoding</CODE> - the encoding used to read and write the files.
1098<DT><B>Throws:</B>
1099<DD><CODE>java.io.IOException</CODE> - if the copying fails.<DT><B>Since:</B></DT>
1100 <DD>Ant 1.5</DD>
1101</DL>
1102</DD>
1103</DL>
1104<HR>
1105
1106<A NAME="copyFile(java.io.File, java.io.File, org.apache.tools.ant.types.FilterSetCollection, java.util.Vector, boolean, boolean, java.lang.String, org.apache.tools.ant.Project)"><!-- --></A><H3>
1107copyFile</H3>
1108<PRE>
1109public void <B>copyFile</B>(java.io.File&nbsp;sourceFile,
1110 java.io.File&nbsp;destFile,
1111 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
1112 java.util.Vector&nbsp;filterChains,
1113 boolean&nbsp;overwrite,
1114 boolean&nbsp;preserveLastModified,
1115 java.lang.String&nbsp;encoding,
1116 <A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;project)
1117 throws java.io.IOException</PRE>
1118<DL>
1119<DD>Convenience method to copy a file from a source to a
1120 destination specifying if token filtering must be used, if
1121 filter chains must be used, if source files may overwrite
1122 newer destination files and the last modified time of
1123 <code>destFile</code> file should be made equal
1124 to the last modified time of <code>sourceFile</code>.
1125<P>
1126<DD><DL>
1127<DT><B>Parameters:</B><DD><CODE>sourceFile</CODE> - the file to copy from.
1128 Must not be <code>null</code>.<DD><CODE>destFile</CODE> - the file to copy to.
1129 Must not be <code>null</code>.<DD><CODE>filters</CODE> - the collection of filters to apply to this copy.<DD><CODE>filterChains</CODE> - filterChains to apply during the copy.<DD><CODE>overwrite</CODE> - Whether or not the destination file should be
1130 overwritten if it already exists.<DD><CODE>preserveLastModified</CODE> - Whether or not the last modified time of
1131 the resulting file should be set to that
1132 of the source file.<DD><CODE>encoding</CODE> - the encoding used to read and write the files.<DD><CODE>project</CODE> - the project instance.
1133<DT><B>Throws:</B>
1134<DD><CODE>java.io.IOException</CODE> - if the copying fails.<DT><B>Since:</B></DT>
1135 <DD>Ant 1.5</DD>
1136</DL>
1137</DD>
1138</DL>
1139<HR>
1140
1141<A NAME="copyFile(java.io.File, java.io.File, org.apache.tools.ant.types.FilterSetCollection, java.util.Vector, boolean, boolean, java.lang.String, java.lang.String, org.apache.tools.ant.Project)"><!-- --></A><H3>
1142copyFile</H3>
1143<PRE>
1144public void <B>copyFile</B>(java.io.File&nbsp;sourceFile,
1145 java.io.File&nbsp;destFile,
1146 <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A>&nbsp;filters,
1147 java.util.Vector&nbsp;filterChains,
1148 boolean&nbsp;overwrite,
1149 boolean&nbsp;preserveLastModified,
1150 java.lang.String&nbsp;inputEncoding,
1151 java.lang.String&nbsp;outputEncoding,
1152 <A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;project)
1153 throws java.io.IOException</PRE>
1154<DL>
1155<DD>Convenience method to copy a file from a source to a
1156 destination specifying if token filtering must be used, if
1157 filter chains must be used, if source files may overwrite
1158 newer destination files and the last modified time of
1159 <code>destFile</code> file should be made equal
1160 to the last modified time of <code>sourceFile</code>.
1161<P>
1162<DD><DL>
1163<DT><B>Parameters:</B><DD><CODE>sourceFile</CODE> - the file to copy from.
1164 Must not be <code>null</code>.<DD><CODE>destFile</CODE> - the file to copy to.
1165 Must not be <code>null</code>.<DD><CODE>filters</CODE> - the collection of filters to apply to this copy.<DD><CODE>filterChains</CODE> - filterChains to apply during the copy.<DD><CODE>overwrite</CODE> - Whether or not the destination file should be
1166 overwritten if it already exists.<DD><CODE>preserveLastModified</CODE> - Whether or not the last modified time of
1167 the resulting file should be set to that
1168 of the source file.<DD><CODE>inputEncoding</CODE> - the encoding used to read the files.<DD><CODE>outputEncoding</CODE> - the encoding used to write the files.<DD><CODE>project</CODE> - the project instance.
1169<DT><B>Throws:</B>
1170<DD><CODE>java.io.IOException</CODE> - if the copying fails.<DT><B>Since:</B></DT>
1171 <DD>Ant 1.6</DD>
1172</DL>
1173</DD>
1174</DL>
1175<HR>
1176
1177<A NAME="setFileLastModified(java.io.File, long)"><!-- --></A><H3>
1178setFileLastModified</H3>
1179<PRE>
1180public void <B>setFileLastModified</B>(java.io.File&nbsp;file,
1181 long&nbsp;time)</PRE>
1182<DL>
1183<DD>Calls File.setLastModified(long time). Originally written to
1184 to dynamically bind to that call on Java1.2+.
1185<P>
1186<DD><DL>
1187<DT><B>Parameters:</B><DD><CODE>file</CODE> - the file whose modified time is to be set<DD><CODE>time</CODE> - the time to which the last modified time is to be set.
1188 if this is -1, the current time is used.</DL>
1189</DD>
1190</DL>
1191<HR>
1192
1193<A NAME="resolveFile(java.io.File, java.lang.String)"><!-- --></A><H3>
1194resolveFile</H3>
1195<PRE>
1196public java.io.File <B>resolveFile</B>(java.io.File&nbsp;file,
1197 java.lang.String&nbsp;filename)</PRE>
1198<DL>
1199<DD>Interpret the filename as a file relative to the given file
1200 unless the filename already represents an absolute filename.
1201<P>
1202<DD><DL>
1203<DT><B>Parameters:</B><DD><CODE>file</CODE> - the "reference" file for relative paths. This
1204 instance must be an absolute file and must not contain
1205 &quot;./&quot; or &quot;../&quot; sequences (same for \ instead
1206 of /). If it is null, this call is equivalent to
1207 <code>new java.io.File(filename)</code>.<DD><CODE>filename</CODE> - a file name.
1208<DT><B>Returns:</B><DD>an absolute file that doesn't contain &quot;./&quot; or
1209 &quot;../&quot; sequences and uses the correct separator for
1210 the current platform.</DL>
1211</DD>
1212</DL>
1213<HR>
1214
1215<A NAME="isAbsolutePath(java.lang.String)"><!-- --></A><H3>
1216isAbsolutePath</H3>
1217<PRE>
1218public static boolean <B>isAbsolutePath</B>(java.lang.String&nbsp;filename)</PRE>
1219<DL>
1220<DD>Verifies that the specified filename represents an absolute path.
1221<P>
1222<DD><DL>
1223<DT><B>Parameters:</B><DD><CODE>filename</CODE> - the filename to be checked.
1224<DT><B>Returns:</B><DD>true if the filename represents an absolute path.</DL>
1225</DD>
1226</DL>
1227<HR>
1228
1229<A NAME="normalize(java.lang.String)"><!-- --></A><H3>
1230normalize</H3>
1231<PRE>
1232public java.io.File <B>normalize</B>(java.lang.String&nbsp;path)</PRE>
1233<DL>
1234<DD>&quot;Normalize&quot; the given absolute path.
1235
1236 <p>This includes:
1237 <ul>
1238 <li>Uppercase the drive letter if there is one.</li>
1239 <li>Remove redundant slashes after the drive spec.</li>
1240 <li>Resolve all ./, .\, ../ and ..\ sequences.</li>
1241 <li>DOS style paths that start with a drive letter will have
1242 \ as the separator.</li>
1243 </ul>
1244 Unlike <code>File#getCanonicalPath()</code> this method
1245 specifically does not resolve symbolic links.
1246<P>
1247<DD><DL>
1248<DT><B>Parameters:</B><DD><CODE>path</CODE> - the path to be normalized.
1249<DT><B>Returns:</B><DD>the normalized version of the path.
1250<DT><B>Throws:</B>
1251<DD><CODE>java.lang.NullPointerException</CODE> - if the file path is
1252 equal to null.</DL>
1253</DD>
1254</DL>
1255<HR>
1256
1257<A NAME="toVMSPath(java.io.File)"><!-- --></A><H3>
1258toVMSPath</H3>
1259<PRE>
1260public java.lang.String <B>toVMSPath</B>(java.io.File&nbsp;f)</PRE>
1261<DL>
1262<DD>Returns a VMS String representation of a <code>File</code> object.
1263 This is useful since the JVM by default internally converts VMS paths
1264 to Unix style.
1265 The returned String is always an absolute path.
1266<P>
1267<DD><DL>
1268<DT><B>Parameters:</B><DD><CODE>f</CODE> - The <code>File</code> to get the VMS path for.
1269<DT><B>Returns:</B><DD>The absolute VMS path to <code>f</code>.</DL>
1270</DD>
1271</DL>
1272<HR>
1273
1274<A NAME="createTempFile(java.lang.String, java.lang.String, java.io.File)"><!-- --></A><H3>
1275createTempFile</H3>
1276<PRE>
1277public java.io.File <B>createTempFile</B>(java.lang.String&nbsp;prefix,
1278 java.lang.String&nbsp;suffix,
1279 java.io.File&nbsp;parentDir)</PRE>
1280<DL>
1281<DD>Create a temporary file in a given directory.
1282
1283 <p>The file denoted by the returned abstract pathname did not
1284 exist before this method was invoked, any subsequent invocation
1285 of this method will yield a different file name.</p>
1286 <p>
1287 The filename is prefixNNNNNsuffix where NNNN is a random number.
1288 </p>
1289 <p>This method is different from File.createTempFile() of JDK 1.2
1290 as it doesn't create the file itself. It uses the location pointed
1291 to by java.io.tmpdir when the parentDir attribute is null.</p>
1292<P>
1293<DD><DL>
1294<DT><B>Parameters:</B><DD><CODE>prefix</CODE> - prefix before the random number.<DD><CODE>suffix</CODE> - file extension; include the '.'.<DD><CODE>parentDir</CODE> - Directory to create the temporary file in;
1295 java.io.tmpdir used if not specified.
1296<DT><B>Returns:</B><DD>a File reference to the new temporary file.<DT><B>Since:</B></DT>
1297 <DD>Ant 1.5</DD>
1298</DL>
1299</DD>
1300</DL>
1301<HR>
1302
1303<A NAME="contentEquals(java.io.File, java.io.File)"><!-- --></A><H3>
1304contentEquals</H3>
1305<PRE>
1306public boolean <B>contentEquals</B>(java.io.File&nbsp;f1,
1307 java.io.File&nbsp;f2)
1308 throws java.io.IOException</PRE>
1309<DL>
1310<DD>Compares the contents of two files.
1311<P>
1312<DD><DL>
1313<DT><B>Parameters:</B><DD><CODE>f1</CODE> - the file whose content is to be compared.<DD><CODE>f2</CODE> - the other file whose content is to be compared.
1314<DT><B>Returns:</B><DD>true if the content of the files is the same.
1315<DT><B>Throws:</B>
1316<DD><CODE>java.io.IOException</CODE> - if the files cannot be read.</DL>
1317</DD>
1318</DL>
1319<HR>
1320
1321<A NAME="contentEquals(java.io.File, java.io.File, boolean)"><!-- --></A><H3>
1322contentEquals</H3>
1323<PRE>
1324public boolean <B>contentEquals</B>(java.io.File&nbsp;f1,
1325 java.io.File&nbsp;f2,
1326 boolean&nbsp;textfile)
1327 throws java.io.IOException</PRE>
1328<DL>
1329<DD>Compares the contents of two files.
1330<P>
1331<DD><DL>
1332<DT><B>Parameters:</B><DD><CODE>f1</CODE> - the file whose content is to be compared.<DD><CODE>f2</CODE> - the other file whose content is to be compared.<DD><CODE>textfile</CODE> - true if the file is to be treated as a text file and
1333 differences in kind of line break are to be ignored.
1334<DT><B>Returns:</B><DD>true if the content of the files is the same.
1335<DT><B>Throws:</B>
1336<DD><CODE>java.io.IOException</CODE> - if the files cannot be read.<DT><B>Since:</B></DT>
1337 <DD>Ant 1.6.3</DD>
1338</DL>
1339</DD>
1340</DL>
1341<HR>
1342
1343<A NAME="getParentFile(java.io.File)"><!-- --></A><H3>
1344getParentFile</H3>
1345<PRE>
1346public java.io.File <B>getParentFile</B>(java.io.File&nbsp;f)</PRE>
1347<DL>
1348<DD>This was originally an emulation of <CODE>File.getParentFile()</CODE> for JDK 1.1,
1349 but it is now implemented using that method (Ant 1.6.3 onwards).
1350<P>
1351<DD><DL>
1352<DT><B>Parameters:</B><DD><CODE>f</CODE> - the file whose parent is required.
1353<DT><B>Returns:</B><DD>the given file's parent, or null if the file does not have a
1354 parent.<DT><B>Since:</B></DT>
1355 <DD>1.10</DD>
1356</DL>
1357</DD>
1358</DL>
1359<HR>
1360
1361<A NAME="readFully(java.io.Reader)"><!-- --></A><H3>
1362readFully</H3>
1363<PRE>
1364public static final java.lang.String <B>readFully</B>(java.io.Reader&nbsp;rdr)
1365 throws java.io.IOException</PRE>
1366<DL>
1367<DD>Read from reader till EOF.
1368<P>
1369<DD><DL>
1370<DT><B>Parameters:</B><DD><CODE>rdr</CODE> - the reader from which to read.
1371<DT><B>Returns:</B><DD>the contents read out of the given reader.
1372<DT><B>Throws:</B>
1373<DD><CODE>java.io.IOException</CODE> - if the contents could not be read out from the
1374 reader.</DL>
1375</DD>
1376</DL>
1377<HR>
1378
1379<A NAME="readFully(java.io.Reader, int)"><!-- --></A><H3>
1380readFully</H3>
1381<PRE>
1382public static final java.lang.String <B>readFully</B>(java.io.Reader&nbsp;rdr,
1383 int&nbsp;bufferSize)
1384 throws java.io.IOException</PRE>
1385<DL>
1386<DD>Read from reader till EOF.
1387<P>
1388<DD><DL>
1389<DT><B>Parameters:</B><DD><CODE>rdr</CODE> - the reader from which to read.<DD><CODE>bufferSize</CODE> - the buffer size to use when reading.
1390<DT><B>Returns:</B><DD>the contents read out of the given reader.
1391<DT><B>Throws:</B>
1392<DD><CODE>java.io.IOException</CODE> - if the contents could not be read out from the
1393 reader.</DL>
1394</DD>
1395</DL>
1396<HR>
1397
1398<A NAME="createNewFile(java.io.File)"><!-- --></A><H3>
1399createNewFile</H3>
1400<PRE>
1401public boolean <B>createNewFile</B>(java.io.File&nbsp;f)
1402 throws java.io.IOException</PRE>
1403<DL>
1404<DD>This was originally an emulation of File.createNewFile for JDK 1.1,
1405 but it is now implemented using that method (Ant 1.6.3 onwards).
1406
1407 <p>This method has historically <strong>not</strong> guaranteed that the
1408 operation was atomic. In its current implementation it is.
1409<P>
1410<DD><DL>
1411<DT><B>Parameters:</B><DD><CODE>f</CODE> - the file to be created.
1412<DT><B>Returns:</B><DD>true if the file did not exist already.
1413<DT><B>Throws:</B>
1414<DD><CODE>java.io.IOException</CODE> - on error.<DT><B>Since:</B></DT>
1415 <DD>Ant 1.5</DD>
1416</DL>
1417</DD>
1418</DL>
1419<HR>
1420
1421<A NAME="createNewFile(java.io.File, boolean)"><!-- --></A><H3>
1422createNewFile</H3>
1423<PRE>
1424public boolean <B>createNewFile</B>(java.io.File&nbsp;f,
1425 boolean&nbsp;mkdirs)
1426 throws java.io.IOException</PRE>
1427<DL>
1428<DD>Create a new file, optionally creating parent directories.
1429<P>
1430<DD><DL>
1431<DT><B>Parameters:</B><DD><CODE>f</CODE> - the file to be created.<DD><CODE>mkdirs</CODE> - <code>boolean</code> whether to create parent directories.
1432<DT><B>Returns:</B><DD>true if the file did not exist already.
1433<DT><B>Throws:</B>
1434<DD><CODE>java.io.IOException</CODE> - on error.<DT><B>Since:</B></DT>
1435 <DD>Ant 1.6.3</DD>
1436</DL>
1437</DD>
1438</DL>
1439<HR>
1440
1441<A NAME="isSymbolicLink(java.io.File, java.lang.String)"><!-- --></A><H3>
1442isSymbolicLink</H3>
1443<PRE>
1444public boolean <B>isSymbolicLink</B>(java.io.File&nbsp;parent,
1445 java.lang.String&nbsp;name)
1446 throws java.io.IOException</PRE>
1447<DL>
1448<DD>Checks whether a given file is a symbolic link.
1449
1450 <p>It doesn't really test for symbolic links but whether the
1451 canonical and absolute paths of the file are identical--this
1452 may lead to false positives on some platforms.</p>
1453<P>
1454<DD><DL>
1455<DT><B>Parameters:</B><DD><CODE>parent</CODE> - the parent directory of the file to test<DD><CODE>name</CODE> - the name of the file to test.
1456<DT><B>Returns:</B><DD>true if the file is a symbolic link.
1457<DT><B>Throws:</B>
1458<DD><CODE>java.io.IOException</CODE> - on error.<DT><B>Since:</B></DT>
1459 <DD>Ant 1.5</DD>
1460</DL>
1461</DD>
1462</DL>
1463<HR>
1464
1465<A NAME="removeLeadingPath(java.io.File, java.io.File)"><!-- --></A><H3>
1466removeLeadingPath</H3>
1467<PRE>
1468public java.lang.String <B>removeLeadingPath</B>(java.io.File&nbsp;leading,
1469 java.io.File&nbsp;path)</PRE>
1470<DL>
1471<DD>Removes a leading path from a second path.
1472<P>
1473<DD><DL>
1474<DT><B>Parameters:</B><DD><CODE>leading</CODE> - The leading path, must not be null, must be absolute.<DD><CODE>path</CODE> - The path to remove from, must not be null, must be absolute.
1475<DT><B>Returns:</B><DD>path's normalized absolute if it doesn't start with
1476 leading; path's path with leading's path removed otherwise.<DT><B>Since:</B></DT>
1477 <DD>Ant 1.5</DD>
1478</DL>
1479</DD>
1480</DL>
1481<HR>
1482
1483<A NAME="toURI(java.lang.String)"><!-- --></A><H3>
1484toURI</H3>
1485<PRE>
1486public java.lang.String <B>toURI</B>(java.lang.String&nbsp;path)</PRE>
1487<DL>
1488<DD>Constructs a <code>file:</code> URI that represents the
1489 external form of the given pathname.
1490
1491 <p>Will be an absolute URI if the given path is absolute.</p>
1492
1493 <p>This code doesn't handle non-ASCII characters properly.</p>
1494<P>
1495<DD><DL>
1496<DT><B>Parameters:</B><DD><CODE>path</CODE> - the path in the local file system.
1497<DT><B>Returns:</B><DD>the URI version of the local path.<DT><B>Since:</B></DT>
1498 <DD>Ant 1.6</DD>
1499</DL>
1500</DD>
1501</DL>
1502<HR>
1503
1504<A NAME="fromURI(java.lang.String)"><!-- --></A><H3>
1505fromURI</H3>
1506<PRE>
1507public java.lang.String <B>fromURI</B>(java.lang.String&nbsp;uri)</PRE>
1508<DL>
1509<DD>Constructs a file path from a <code>file:</code> URI.
1510
1511 <p>Will be an absolute path if the given URI is absolute.</p>
1512
1513 <p>Swallows '%' that are not followed by two characters,
1514 doesn't deal with non-ASCII characters.</p>
1515<P>
1516<DD><DL>
1517<DT><B>Parameters:</B><DD><CODE>uri</CODE> - the URI designating a file in the local filesystem.
1518<DT><B>Returns:</B><DD>the local file system path for the file.<DT><B>Since:</B></DT>
1519 <DD>Ant 1.6</DD>
1520</DL>
1521</DD>
1522</DL>
1523<HR>
1524
1525<A NAME="fileNameEquals(java.io.File, java.io.File)"><!-- --></A><H3>
1526fileNameEquals</H3>
1527<PRE>
1528public boolean <B>fileNameEquals</B>(java.io.File&nbsp;f1,
1529 java.io.File&nbsp;f2)</PRE>
1530<DL>
1531<DD>Compares two filenames.
1532
1533 <p>Unlike java.io.File#equals this method will try to compare
1534 the absolute paths and &quot;normalize&quot; the filenames
1535 before comparing them.</p>
1536<P>
1537<DD><DL>
1538<DT><B>Parameters:</B><DD><CODE>f1</CODE> - the file whose name is to be compared.<DD><CODE>f2</CODE> - the other file whose name is to be compared.
1539<DT><B>Returns:</B><DD>true if the file are for the same file.<DT><B>Since:</B></DT>
1540 <DD>Ant 1.5.3</DD>
1541</DL>
1542</DD>
1543</DL>
1544<HR>
1545
1546<A NAME="rename(java.io.File, java.io.File)"><!-- --></A><H3>
1547rename</H3>
1548<PRE>
1549public void <B>rename</B>(java.io.File&nbsp;from,
1550 java.io.File&nbsp;to)
1551 throws java.io.IOException</PRE>
1552<DL>
1553<DD>Renames a file, even if that involves crossing file system boundaries.
1554
1555 <p>This will remove <code>to</code> (if it exists), ensure that
1556 <code>to</code>'s parent directory exists and move
1557 <code>from</code>, which involves deleting <code>from</code> as
1558 well.</p>
1559<P>
1560<DD><DL>
1561<DT><B>Parameters:</B><DD><CODE>from</CODE> - the file to move.<DD><CODE>to</CODE> - the new file name.
1562<DT><B>Throws:</B>
1563<DD><CODE>java.io.IOException</CODE> - if anything bad happens during this
1564 process. Note that <code>to</code> may have been deleted
1565 already when this happens.<DT><B>Since:</B></DT>
1566 <DD>Ant 1.6</DD>
1567</DL>
1568</DD>
1569</DL>
1570<HR>
1571
1572<A NAME="getFileTimestampGranularity()"><!-- --></A><H3>
1573getFileTimestampGranularity</H3>
1574<PRE>
1575public long <B>getFileTimestampGranularity</B>()</PRE>
1576<DL>
1577<DD>Get the granularity of file timestamps.
1578 The choice is made based on OS, which is incorrect--it should really be
1579 by filesystem. We do not have an easy way to probe for file systems,
1580 however.
1581<P>
1582<DD><DL>
1583
1584<DT><B>Returns:</B><DD>the difference, in milliseconds, which two file timestamps must have
1585 in order for the two files to be given a creation order.</DL>
1586</DD>
1587</DL>
1588<HR>
1589
1590<A NAME="isUpToDate(java.io.File, java.io.File, long)"><!-- --></A><H3>
1591isUpToDate</H3>
1592<PRE>
1593public boolean <B>isUpToDate</B>(java.io.File&nbsp;source,
1594 java.io.File&nbsp;dest,
1595 long&nbsp;granularity)</PRE>
1596<DL>
1597<DD>Returns true if the source is older than the dest.
1598 If the dest file does not exist, then the test returns false; it is
1599 implicitly not up do date.
1600<P>
1601<DD><DL>
1602<DT><B>Parameters:</B><DD><CODE>source</CODE> - source file (should be the older).<DD><CODE>dest</CODE> - dest file (should be the newer).<DD><CODE>granularity</CODE> - an offset added to the source time.
1603<DT><B>Returns:</B><DD>true if the source is older than the dest after accounting
1604 for granularity.<DT><B>Since:</B></DT>
1605 <DD>Ant 1.6.3</DD>
1606</DL>
1607</DD>
1608</DL>
1609<HR>
1610
1611<A NAME="isUpToDate(java.io.File, java.io.File)"><!-- --></A><H3>
1612isUpToDate</H3>
1613<PRE>
1614public boolean <B>isUpToDate</B>(java.io.File&nbsp;source,
1615 java.io.File&nbsp;dest)</PRE>
1616<DL>
1617<DD>Returns true if the source is older than the dest.
1618<P>
1619<DD><DL>
1620<DT><B>Parameters:</B><DD><CODE>source</CODE> - source file (should be the older).<DD><CODE>dest</CODE> - dest file (should be the newer).
1621<DT><B>Returns:</B><DD>true if the source is older than the dest, taking the granularity into account.<DT><B>Since:</B></DT>
1622 <DD>Ant 1.6.3</DD>
1623</DL>
1624</DD>
1625</DL>
1626<HR>
1627
1628<A NAME="isUpToDate(long, long, long)"><!-- --></A><H3>
1629isUpToDate</H3>
1630<PRE>
1631public boolean <B>isUpToDate</B>(long&nbsp;sourceTime,
1632 long&nbsp;destTime,
1633 long&nbsp;granularity)</PRE>
1634<DL>
1635<DD>Compare two timestamps for being up to date using
1636 the specified granularity.
1637<P>
1638<DD><DL>
1639<DT><B>Parameters:</B><DD><CODE>sourceTime</CODE> - timestamp of source file.<DD><CODE>destTime</CODE> - timestamp of dest file.<DD><CODE>granularity</CODE> - os/filesys granularity.
1640<DT><B>Returns:</B><DD>true if the dest file is considered up to date.</DL>
1641</DD>
1642</DL>
1643<HR>
1644
1645<A NAME="isUpToDate(long, long)"><!-- --></A><H3>
1646isUpToDate</H3>
1647<PRE>
1648public boolean <B>isUpToDate</B>(long&nbsp;sourceTime,
1649 long&nbsp;destTime)</PRE>
1650<DL>
1651<DD>Compare two timestamps for being up to date using the
1652 current granularity.
1653<P>
1654<DD><DL>
1655<DT><B>Parameters:</B><DD><CODE>sourceTime</CODE> - timestamp of source file.<DD><CODE>destTime</CODE> - timestamp of dest file.
1656<DT><B>Returns:</B><DD>true if the dest file is considered up to date.</DL>
1657</DD>
1658</DL>
1659<HR>
1660
1661<A NAME="close(java.io.Writer)"><!-- --></A><H3>
1662close</H3>
1663<PRE>
1664public static void <B>close</B>(java.io.Writer&nbsp;device)</PRE>
1665<DL>
1666<DD>Close a Writer without throwing any exception if something went wrong.
1667 Do not attempt to close it if the argument is null.
1668<P>
1669<DD><DL>
1670<DT><B>Parameters:</B><DD><CODE>device</CODE> - output writer, can be null.</DL>
1671</DD>
1672</DL>
1673<HR>
1674
1675<A NAME="close(java.io.Reader)"><!-- --></A><H3>
1676close</H3>
1677<PRE>
1678public static void <B>close</B>(java.io.Reader&nbsp;device)</PRE>
1679<DL>
1680<DD>Close a stream without throwing any exception if something went wrong.
1681 Do not attempt to close it if the argument is null.
1682<P>
1683<DD><DL>
1684<DT><B>Parameters:</B><DD><CODE>device</CODE> - Reader, can be null.</DL>
1685</DD>
1686</DL>
1687<HR>
1688
1689<A NAME="close(java.io.OutputStream)"><!-- --></A><H3>
1690close</H3>
1691<PRE>
1692public static void <B>close</B>(java.io.OutputStream&nbsp;device)</PRE>
1693<DL>
1694<DD>Close a stream without throwing any exception if something went wrong.
1695 Do not attempt to close it if the argument is null.
1696<P>
1697<DD><DL>
1698<DT><B>Parameters:</B><DD><CODE>device</CODE> - stream, can be null.</DL>
1699</DD>
1700</DL>
1701<HR>
1702
1703<A NAME="close(java.io.InputStream)"><!-- --></A><H3>
1704close</H3>
1705<PRE>
1706public static void <B>close</B>(java.io.InputStream&nbsp;device)</PRE>
1707<DL>
1708<DD>Close a stream without throwing any exception if something went wrong.
1709 Do not attempt to close it if the argument is null.
1710<P>
1711<DD><DL>
1712<DT><B>Parameters:</B><DD><CODE>device</CODE> - stream, can be null.</DL>
1713</DD>
1714</DL>
1715<HR>
1716
1717<A NAME="delete(java.io.File)"><!-- --></A><H3>
1718delete</H3>
1719<PRE>
1720public static void <B>delete</B>(java.io.File&nbsp;file)</PRE>
1721<DL>
1722<DD>Delete the file with <CODE>File.delete()</CODE> if the argument is not null.
1723 Do nothing on a null argument.
1724<P>
1725<DD><DL>
1726<DT><B>Parameters:</B><DD><CODE>file</CODE> - file to delete.</DL>
1727</DD>
1728</DL>
1729<!-- ========= END OF CLASS DATA ========= -->
1730<HR>
1731
1732
1733<!-- ======= START OF BOTTOM NAVBAR ====== -->
1734<A NAME="navbar_bottom"><!-- --></A>
1735<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
1736<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
1737<TR>
1738<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
1739<A NAME="navbar_bottom_firstrow"><!-- --></A>
1740<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
1741 <TR ALIGN="center" VALIGN="top">
1742 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
1743 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
1744 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
1745 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
1746 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
1747 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
1748 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
1749 </TR>
1750</TABLE>
1751</TD>
1752<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1753</EM>
1754</TD>
1755</TR>
1756
1757<TR>
1758<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1759&nbsp;<A HREF="../../../../../org/apache/tools/ant/util/DOMUtils.html" title="class in org.apache.tools.ant.util"><B>PREV CLASS</B></A>&nbsp;
1760&nbsp;<A HREF="../../../../../org/apache/tools/ant/util/FlatFileNameMapper.html" title="class in org.apache.tools.ant.util"><B>NEXT CLASS</B></A></FONT></TD>
1761<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1762 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
1763&nbsp;<A HREF="FileUtils.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
1764&nbsp;<SCRIPT type="text/javascript">
1765 <!--
1766 if(window==top) {
1767 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
1768 }
1769 //-->
1770</SCRIPT>
1771<NOSCRIPT>
1772 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
1773</NOSCRIPT>
1774
1775</FONT></TD>
1776</TR>
1777<TR>
1778<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1779 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
1780<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1781DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
1782</TR>
1783</TABLE>
1784<A NAME="skip-navbar_bottom"></A>
1785<!-- ======== END OF BOTTOM NAVBAR ======= -->
1786
1787<HR>
1788Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
1789</BODY>
1790</HTML>
Note: See TracBrowser for help on using the repository browser.