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

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

initial import of LiRK3

File size: 23.4 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:32 NZST 2007 -->
6<TITLE>
7Resource (Apache Ant API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="org.apache.tools.ant.types.Resource 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="Resource (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/types/RegularExpression.html" title="class in org.apache.tools.ant.types"><B>PREV CLASS</B></A>&nbsp;
53&nbsp;<A HREF="../../../../../org/apache/tools/ant/types/ResourceLocation.html" title="class in org.apache.tools.ant.types"><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="Resource.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.types</FONT>
85<BR>
86Class Resource</H2>
87<PRE>
88java.lang.Object
89 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.ant.types.Resource</B>
90</PRE>
91<DL>
92<DT><B>All Implemented Interfaces:</B> <DD>java.lang.Cloneable, java.lang.Comparable</DD>
93</DL>
94<HR>
95<DL>
96<DT>public class <B>Resource</B><DT>extends java.lang.Object<DT>implements java.lang.Cloneable, java.lang.Comparable</DL>
97
98<P>
99Describes a File or a ZipEntry.
100
101 This class is meant to be used by classes needing to record path
102 and date/time information about a file, a zip entry or some similar
103 resource (URL, archive in a version control repository, ...).
104<P>
105
106<P>
107<DL>
108<DT><B>Since:</B></DT>
109 <DD>Ant 1.5.2</DD>
110</DL>
111<HR>
112
113<P>
114<!-- ======== NESTED CLASS SUMMARY ======== -->
115
116
117<!-- =========== FIELD SUMMARY =========== -->
118
119<A NAME="field_summary"><!-- --></A>
120<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
121<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
122<TD COLSPAN=2><FONT SIZE="+2">
123<B>Field Summary</B></FONT></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/types/Resource.html#UNKNOWN_SIZE">UNKNOWN_SIZE</A></B></CODE>
129
130<BR>
131&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constant unknown size</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><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#Resource()">Resource</A></B>()</CODE>
145
146<BR>
147&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default constructor.</TD>
148</TR>
149<TR BGCOLOR="white" CLASS="TableRowColor">
150<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#Resource(java.lang.String)">Resource</A></B>(java.lang.String&nbsp;name)</CODE>
151
152<BR>
153&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Only sets the name.</TD>
154</TR>
155<TR BGCOLOR="white" CLASS="TableRowColor">
156<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#Resource(java.lang.String, boolean, long)">Resource</A></B>(java.lang.String&nbsp;name,
157 boolean&nbsp;exists,
158 long&nbsp;lastmodified)</CODE>
159
160<BR>
161&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the name, lastmodified flag, and exists flag.</TD>
162</TR>
163<TR BGCOLOR="white" CLASS="TableRowColor">
164<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#Resource(java.lang.String, boolean, long, boolean)">Resource</A></B>(java.lang.String&nbsp;name,
165 boolean&nbsp;exists,
166 long&nbsp;lastmodified,
167 boolean&nbsp;directory)</CODE>
168
169<BR>
170&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the name, lastmodified flag, exists flag, and directory flag.</TD>
171</TR>
172<TR BGCOLOR="white" CLASS="TableRowColor">
173<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#Resource(java.lang.String, boolean, long, boolean, long)">Resource</A></B>(java.lang.String&nbsp;name,
174 boolean&nbsp;exists,
175 long&nbsp;lastmodified,
176 boolean&nbsp;directory,
177 long&nbsp;size)</CODE>
178
179<BR>
180&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the name, lastmodified flag, exists flag, directory flag, and size.</TD>
181</TR>
182</TABLE>
183&nbsp;
184<!-- ========== METHOD SUMMARY =========== -->
185
186<A NAME="method_summary"><!-- --></A>
187<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
188<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
189<TD COLSPAN=2><FONT SIZE="+2">
190<B>Method Summary</B></FONT></TD>
191</TR>
192<TR BGCOLOR="white" CLASS="TableRowColor">
193<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
194<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
195<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#clone()">clone</A></B>()</CODE>
196
197<BR>
198&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clone this Resource.</TD>
199</TR>
200<TR BGCOLOR="white" CLASS="TableRowColor">
201<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
202<CODE>&nbsp;int</CODE></FONT></TD>
203<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#compareTo(java.lang.Object)">compareTo</A></B>(java.lang.Object&nbsp;other)</CODE>
204
205<BR>
206&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delegates to a comparison of names.</TD>
207</TR>
208<TR BGCOLOR="white" CLASS="TableRowColor">
209<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
210<CODE>&nbsp;long</CODE></FONT></TD>
211<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#getLastModified()">getLastModified</A></B>()</CODE>
212
213<BR>
214&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells the modification time in milliseconds since 01.01.1970 .</TD>
215</TR>
216<TR BGCOLOR="white" CLASS="TableRowColor">
217<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
218<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
219<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#getName()">getName</A></B>()</CODE>
220
221<BR>
222&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name attribute will contain the path of a file relative to the
223 root directory of its fileset or the recorded path of a zip
224 entry.</TD>
225</TR>
226<TR BGCOLOR="white" CLASS="TableRowColor">
227<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
228<CODE>&nbsp;long</CODE></FONT></TD>
229<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#getSize()">getSize</A></B>()</CODE>
230
231<BR>
232&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the size of this Resource.</TD>
233</TR>
234<TR BGCOLOR="white" CLASS="TableRowColor">
235<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
236<CODE>&nbsp;boolean</CODE></FONT></TD>
237<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#isDirectory()">isDirectory</A></B>()</CODE>
238
239<BR>
240&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells if the resource is a directory.</TD>
241</TR>
242<TR BGCOLOR="white" CLASS="TableRowColor">
243<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
244<CODE>&nbsp;boolean</CODE></FONT></TD>
245<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#isExists()">isExists</A></B>()</CODE>
246
247<BR>
248&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The exists attribute tells whether a file exists.</TD>
249</TR>
250<TR BGCOLOR="white" CLASS="TableRowColor">
251<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
252<CODE>&nbsp;void</CODE></FONT></TD>
253<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#setDirectory(boolean)">setDirectory</A></B>(boolean&nbsp;directory)</CODE>
254
255<BR>
256&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the directory attribute.</TD>
257</TR>
258<TR BGCOLOR="white" CLASS="TableRowColor">
259<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
260<CODE>&nbsp;void</CODE></FONT></TD>
261<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#setExists(boolean)">setExists</A></B>(boolean&nbsp;exists)</CODE>
262
263<BR>
264&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the exists attribute.</TD>
265</TR>
266<TR BGCOLOR="white" CLASS="TableRowColor">
267<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
268<CODE>&nbsp;void</CODE></FONT></TD>
269<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#setLastModified(long)">setLastModified</A></B>(long&nbsp;lastmodified)</CODE>
270
271<BR>
272&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the last modification attribute.</TD>
273</TR>
274<TR BGCOLOR="white" CLASS="TableRowColor">
275<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
276<CODE>&nbsp;void</CODE></FONT></TD>
277<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#setName(java.lang.String)">setName</A></B>(java.lang.String&nbsp;name)</CODE>
278
279<BR>
280&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the name of this Resource.</TD>
281</TR>
282<TR BGCOLOR="white" CLASS="TableRowColor">
283<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
284<CODE>&nbsp;void</CODE></FONT></TD>
285<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Resource.html#setSize(long)">setSize</A></B>(long&nbsp;size)</CODE>
286
287<BR>
288&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the size of this Resource.</TD>
289</TR>
290</TABLE>
291&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
292<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
293<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
294<TD><B>Methods inherited from class java.lang.Object</B></TD>
295</TR>
296<TR BGCOLOR="white" CLASS="TableRowColor">
297<TD><CODE>equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
298</TR>
299</TABLE>
300&nbsp;
301<P>
302
303<!-- ============ FIELD DETAIL =========== -->
304
305<A NAME="field_detail"><!-- --></A>
306<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
307<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
308<TD COLSPAN=1><FONT SIZE="+2">
309<B>Field Detail</B></FONT></TD>
310</TR>
311</TABLE>
312
313<A NAME="UNKNOWN_SIZE"><!-- --></A><H3>
314UNKNOWN_SIZE</H3>
315<PRE>
316public static final long <B>UNKNOWN_SIZE</B></PRE>
317<DL>
318<DD>Constant unknown size
319<P>
320<DL>
321<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.tools.ant.types.Resource.UNKNOWN_SIZE">Constant Field Values</A></DL>
322</DL>
323
324<!-- ========= CONSTRUCTOR DETAIL ======== -->
325
326<A NAME="constructor_detail"><!-- --></A>
327<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
328<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
329<TD COLSPAN=1><FONT SIZE="+2">
330<B>Constructor Detail</B></FONT></TD>
331</TR>
332</TABLE>
333
334<A NAME="Resource()"><!-- --></A><H3>
335Resource</H3>
336<PRE>
337public <B>Resource</B>()</PRE>
338<DL>
339<DD>Default constructor.
340<P>
341</DL>
342<HR>
343
344<A NAME="Resource(java.lang.String)"><!-- --></A><H3>
345Resource</H3>
346<PRE>
347public <B>Resource</B>(java.lang.String&nbsp;name)</PRE>
348<DL>
349<DD>Only sets the name.
350
351 <p>This is a dummy, used for not existing resources.</p>
352<P>
353<DT><B>Parameters:</B><DD><CODE>name</CODE> - relative path of the resource. Expects
354 &quot;/&quot; to be used as the directory separator.</DL>
355<HR>
356
357<A NAME="Resource(java.lang.String, boolean, long)"><!-- --></A><H3>
358Resource</H3>
359<PRE>
360public <B>Resource</B>(java.lang.String&nbsp;name,
361 boolean&nbsp;exists,
362 long&nbsp;lastmodified)</PRE>
363<DL>
364<DD>Sets the name, lastmodified flag, and exists flag.
365<P>
366<DT><B>Parameters:</B><DD><CODE>name</CODE> - relative path of the resource. Expects
367 &quot;/&quot; to be used as the directory separator.<DD><CODE>exists</CODE> - if true, this resource exists.<DD><CODE>lastmodified</CODE> - the last modification time of this resource.</DL>
368<HR>
369
370<A NAME="Resource(java.lang.String, boolean, long, boolean)"><!-- --></A><H3>
371Resource</H3>
372<PRE>
373public <B>Resource</B>(java.lang.String&nbsp;name,
374 boolean&nbsp;exists,
375 long&nbsp;lastmodified,
376 boolean&nbsp;directory)</PRE>
377<DL>
378<DD>Sets the name, lastmodified flag, exists flag, and directory flag.
379<P>
380<DT><B>Parameters:</B><DD><CODE>name</CODE> - relative path of the resource. Expects
381 &quot;/&quot; to be used as the directory separator.<DD><CODE>exists</CODE> - if true the resource exists<DD><CODE>lastmodified</CODE> - the last modification time of the resource<DD><CODE>directory</CODE> - if true, this resource is a directory</DL>
382<HR>
383
384<A NAME="Resource(java.lang.String, boolean, long, boolean, long)"><!-- --></A><H3>
385Resource</H3>
386<PRE>
387public <B>Resource</B>(java.lang.String&nbsp;name,
388 boolean&nbsp;exists,
389 long&nbsp;lastmodified,
390 boolean&nbsp;directory,
391 long&nbsp;size)</PRE>
392<DL>
393<DD>Sets the name, lastmodified flag, exists flag, directory flag, and size.
394<P>
395<DT><B>Parameters:</B><DD><CODE>name</CODE> - relative path of the resource. Expects
396 &quot;/&quot; to be used as the directory separator.<DD><CODE>exists</CODE> - if true the resource exists<DD><CODE>lastmodified</CODE> - the last modification time of the resource<DD><CODE>directory</CODE> - if true, this resource is a directory<DD><CODE>size</CODE> - the size of this resource.</DL>
397
398<!-- ============ METHOD DETAIL ========== -->
399
400<A NAME="method_detail"><!-- --></A>
401<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
402<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
403<TD COLSPAN=1><FONT SIZE="+2">
404<B>Method Detail</B></FONT></TD>
405</TR>
406</TABLE>
407
408<A NAME="getName()"><!-- --></A><H3>
409getName</H3>
410<PRE>
411public java.lang.String <B>getName</B>()</PRE>
412<DL>
413<DD>Name attribute will contain the path of a file relative to the
414 root directory of its fileset or the recorded path of a zip
415 entry.
416
417 <p>example for a file with fullpath /var/opt/adm/resource.txt
418 in a file set with root dir /var/opt it will be
419 adm/resource.txt.</p>
420
421 <p>&quot;/&quot; will be used as the directory separator.</p>
422<P>
423<DD><DL>
424</DL>
425</DD>
426<DD><DL>
427
428<DT><B>Returns:</B><DD>the name of this resource.</DL>
429</DD>
430</DL>
431<HR>
432
433<A NAME="setName(java.lang.String)"><!-- --></A><H3>
434setName</H3>
435<PRE>
436public void <B>setName</B>(java.lang.String&nbsp;name)</PRE>
437<DL>
438<DD>Set the name of this Resource.
439<P>
440<DD><DL>
441</DL>
442</DD>
443<DD><DL>
444<DT><B>Parameters:</B><DD><CODE>name</CODE> - relative path of the resource. Expects
445 &quot;/&quot; to be used as the directory separator.</DL>
446</DD>
447</DL>
448<HR>
449
450<A NAME="isExists()"><!-- --></A><H3>
451isExists</H3>
452<PRE>
453public boolean <B>isExists</B>()</PRE>
454<DL>
455<DD>The exists attribute tells whether a file exists.
456<P>
457<DD><DL>
458</DL>
459</DD>
460<DD><DL>
461
462<DT><B>Returns:</B><DD>true if this resource exists.</DL>
463</DD>
464</DL>
465<HR>
466
467<A NAME="setExists(boolean)"><!-- --></A><H3>
468setExists</H3>
469<PRE>
470public void <B>setExists</B>(boolean&nbsp;exists)</PRE>
471<DL>
472<DD>Set the exists attribute.
473<P>
474<DD><DL>
475</DL>
476</DD>
477<DD><DL>
478<DT><B>Parameters:</B><DD><CODE>exists</CODE> - if true, this resource exists.</DL>
479</DD>
480</DL>
481<HR>
482
483<A NAME="getLastModified()"><!-- --></A><H3>
484getLastModified</H3>
485<PRE>
486public long <B>getLastModified</B>()</PRE>
487<DL>
488<DD>Tells the modification time in milliseconds since 01.01.1970 .
489<P>
490<DD><DL>
491</DL>
492</DD>
493<DD><DL>
494
495<DT><B>Returns:</B><DD>0 if the resource does not exist to mirror the behavior
496 of <CODE>File</CODE>.</DL>
497</DD>
498</DL>
499<HR>
500
501<A NAME="setLastModified(long)"><!-- --></A><H3>
502setLastModified</H3>
503<PRE>
504public void <B>setLastModified</B>(long&nbsp;lastmodified)</PRE>
505<DL>
506<DD>Set the last modification attribute.
507<P>
508<DD><DL>
509</DL>
510</DD>
511<DD><DL>
512<DT><B>Parameters:</B><DD><CODE>lastmodified</CODE> - the modification time in milliseconds since 01.01.1970.</DL>
513</DD>
514</DL>
515<HR>
516
517<A NAME="isDirectory()"><!-- --></A><H3>
518isDirectory</H3>
519<PRE>
520public boolean <B>isDirectory</B>()</PRE>
521<DL>
522<DD>Tells if the resource is a directory.
523<P>
524<DD><DL>
525</DL>
526</DD>
527<DD><DL>
528
529<DT><B>Returns:</B><DD>boolean flag indicating if the resource is a directory.</DL>
530</DD>
531</DL>
532<HR>
533
534<A NAME="setDirectory(boolean)"><!-- --></A><H3>
535setDirectory</H3>
536<PRE>
537public void <B>setDirectory</B>(boolean&nbsp;directory)</PRE>
538<DL>
539<DD>Set the directory attribute.
540<P>
541<DD><DL>
542</DL>
543</DD>
544<DD><DL>
545<DT><B>Parameters:</B><DD><CODE>directory</CODE> - if true, this resource is a directory.</DL>
546</DD>
547</DL>
548<HR>
549
550<A NAME="setSize(long)"><!-- --></A><H3>
551setSize</H3>
552<PRE>
553public void <B>setSize</B>(long&nbsp;size)</PRE>
554<DL>
555<DD>Set the size of this Resource.
556<P>
557<DD><DL>
558</DL>
559</DD>
560<DD><DL>
561<DT><B>Parameters:</B><DD><CODE>size</CODE> - the size, as a long.<DT><B>Since:</B></DT>
562 <DD>Ant 1.6.3</DD>
563</DL>
564</DD>
565</DL>
566<HR>
567
568<A NAME="getSize()"><!-- --></A><H3>
569getSize</H3>
570<PRE>
571public long <B>getSize</B>()</PRE>
572<DL>
573<DD>Get the size of this Resource.
574<P>
575<DD><DL>
576</DL>
577</DD>
578<DD><DL>
579
580<DT><B>Returns:</B><DD>the size, as a long, 0 if the Resource does not exist (for
581 compatibility with java.io.File), or UNKNOWN_SIZE if not known.<DT><B>Since:</B></DT>
582 <DD>Ant 1.6.3</DD>
583</DL>
584</DD>
585</DL>
586<HR>
587
588<A NAME="clone()"><!-- --></A><H3>
589clone</H3>
590<PRE>
591public java.lang.Object <B>clone</B>()</PRE>
592<DL>
593<DD>Clone this Resource.
594<P>
595<DD><DL>
596</DL>
597</DD>
598<DD><DL>
599
600<DT><B>Returns:</B><DD>copy of this.</DL>
601</DD>
602</DL>
603<HR>
604
605<A NAME="compareTo(java.lang.Object)"><!-- --></A><H3>
606compareTo</H3>
607<PRE>
608public int <B>compareTo</B>(java.lang.Object&nbsp;other)</PRE>
609<DL>
610<DD>Delegates to a comparison of names.
611<P>
612<DD><DL>
613<DT><B>Specified by:</B><DD><CODE>compareTo</CODE> in interface <CODE>java.lang.Comparable</CODE></DL>
614</DD>
615<DD><DL>
616<DT><B>Parameters:</B><DD><CODE>other</CODE> - the object to compare to.
617<DT><B>Returns:</B><DD>a negative integer, zero, or a positive integer as this Resource
618 is less than, equal to, or greater than the specified Resource.<DT><B>Since:</B></DT>
619 <DD>Ant 1.6</DD>
620</DL>
621</DD>
622</DL>
623<!-- ========= END OF CLASS DATA ========= -->
624<HR>
625
626
627<!-- ======= START OF BOTTOM NAVBAR ====== -->
628<A NAME="navbar_bottom"><!-- --></A>
629<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
630<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
631<TR>
632<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
633<A NAME="navbar_bottom_firstrow"><!-- --></A>
634<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
635 <TR ALIGN="center" VALIGN="top">
636 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
637 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
638 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
639 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
640 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
641 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
642 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
643 </TR>
644</TABLE>
645</TD>
646<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
647</EM>
648</TD>
649</TR>
650
651<TR>
652<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
653&nbsp;<A HREF="../../../../../org/apache/tools/ant/types/RegularExpression.html" title="class in org.apache.tools.ant.types"><B>PREV CLASS</B></A>&nbsp;
654&nbsp;<A HREF="../../../../../org/apache/tools/ant/types/ResourceLocation.html" title="class in org.apache.tools.ant.types"><B>NEXT CLASS</B></A></FONT></TD>
655<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
656 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
657&nbsp;<A HREF="Resource.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
658&nbsp;<SCRIPT type="text/javascript">
659 <!--
660 if(window==top) {
661 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
662 }
663 //-->
664</SCRIPT>
665<NOSCRIPT>
666 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
667</NOSCRIPT>
668
669</FONT></TD>
670</TR>
671<TR>
672<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
673 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>
674<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
675DETAIL:&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>
676</TR>
677</TABLE>
678<A NAME="skip-navbar_bottom"></A>
679<!-- ======== END OF BOTTOM NAVBAR ======= -->
680
681<HR>
682Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
683</BODY>
684</HTML>
Note: See TracBrowser for help on using the repository browser.