Edit C:\apache-ant-1.8.0\docs\manual\api\org\apache\tools\ant\util\ResourceUtils.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_22) on Mon Feb 01 19:36:00 EST 2010 --> <TITLE> ResourceUtils (Apache Ant API) </TITLE> <META NAME="keywords" CONTENT="org.apache.tools.ant.util.ResourceUtils class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="ResourceUtils (Apache Ant API)"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../org/apache/tools/ant/util/RegexpPatternMapper.html" title="class in org.apache.tools.ant.util"><B>PREV CLASS</B></A> <A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.ResourceSelectorProvider.html" title="interface in org.apache.tools.ant.util"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/tools/ant/util/ResourceUtils.html" target="_top"><B>FRAMES</B></A> <A HREF="ResourceUtils.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> org.apache.tools.ant.util</FONT> <BR> Class ResourceUtils</H2> <PRE> java.lang.Object <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.tools.ant.util.ResourceUtils</B> </PRE> <HR> <DL> <DT><PRE>public class <B>ResourceUtils</B><DT>extends java.lang.Object</DL> </PRE> <P> This class provides utility methods to process Resources. <P> <P> <DL> <DT><B>Since:</B></DT> <DD>Ant 1.5.2</DD> </DL> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <A NAME="nested_class_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Nested Class Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static interface</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.ResourceSelectorProvider.html" title="interface in org.apache.tools.ant.util">ResourceUtils.ResourceSelectorProvider</A></B></CODE> <BR> </TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.html#ResourceUtils()">ResourceUtils</A></B>()</CODE> <BR> </TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../../org/apache/tools/ant/types/resources/FileResource.html" title="class in org.apache.tools.ant.types.resources">FileResource</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.html#asFileResource(org.apache.tools.ant.types.resources.FileProvider)">asFileResource</A></B>(<A HREF="../../../../../org/apache/tools/ant/types/resources/FileProvider.html" title="interface in org.apache.tools.ant.types.resources">FileProvider</A> fileProvider)</CODE> <BR> Convenience method to turn any fileProvider into a basic FileResource with the file's immediate parent as the basedir, for tasks that need one.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.html#compareContent(org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.Resource, boolean)">compareContent</A></B>(<A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> r1, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> r2, boolean text)</CODE> <BR> Compare the content of two Resources.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.html#contentEquals(org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.Resource, boolean)">contentEquals</A></B>(<A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> r1, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> r2, boolean text)</CODE> <BR> Compares the contents of two Resources.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.html#copyResource(org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.Resource)">copyResource</A></B>(<A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> source, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> dest)</CODE> <BR> Convenience method to copy content from one Resource to another.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.html#copyResource(org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.FilterSetCollection, java.util.Vector, boolean, boolean, boolean, java.lang.String, java.lang.String, org.apache.tools.ant.Project)">copyResource</A></B>(<A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> source, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> dest, <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A> filters, java.util.Vector filterChains, boolean overwrite, boolean preserveLastModified, boolean append, java.lang.String inputEncoding, java.lang.String outputEncoding, <A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> project)</CODE> <BR> Convenience method to copy content from one Resource to another specifying whether token filtering must be used, whether filter chains must be used, whether newer destination files may be overwritten and whether the last modified time of <code>dest</code> file should be made equal to the last modified time of <code>source</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.html#copyResource(org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.FilterSetCollection, java.util.Vector, boolean, boolean, java.lang.String, java.lang.String, org.apache.tools.ant.Project)">copyResource</A></B>(<A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> source, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> dest, <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A> filters, java.util.Vector filterChains, boolean overwrite, boolean preserveLastModified, java.lang.String inputEncoding, java.lang.String outputEncoding, <A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> project)</CODE> <BR> Convenience method to copy content from one Resource to another specifying whether token filtering must be used, whether filter chains must be used, whether newer destination files may be overwritten and whether the last modified time of <code>dest</code> file should be made equal to the last modified time of <code>source</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.html#copyResource(org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.Resource, org.apache.tools.ant.Project)">copyResource</A></B>(<A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> source, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> dest, <A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> project)</CODE> <BR> Convenience method to copy content from one Resource to another.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A>[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.html#selectOutOfDateSources(org.apache.tools.ant.ProjectComponent, org.apache.tools.ant.types.Resource[], org.apache.tools.ant.util.FileNameMapper, org.apache.tools.ant.types.ResourceFactory)">selectOutOfDateSources</A></B>(<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A> logTo, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A>[] source, <A HREF="../../../../../org/apache/tools/ant/util/FileNameMapper.html" title="interface in org.apache.tools.ant.util">FileNameMapper</A> mapper, <A HREF="../../../../../org/apache/tools/ant/types/ResourceFactory.html" title="interface in org.apache.tools.ant.types">ResourceFactory</A> targets)</CODE> <BR> Tells which source files should be reprocessed based on the last modification date of target files.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A>[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.html#selectOutOfDateSources(org.apache.tools.ant.ProjectComponent, org.apache.tools.ant.types.Resource[], org.apache.tools.ant.util.FileNameMapper, org.apache.tools.ant.types.ResourceFactory, long)">selectOutOfDateSources</A></B>(<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A> logTo, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A>[] source, <A HREF="../../../../../org/apache/tools/ant/util/FileNameMapper.html" title="interface in org.apache.tools.ant.util">FileNameMapper</A> mapper, <A HREF="../../../../../org/apache/tools/ant/types/ResourceFactory.html" title="interface in org.apache.tools.ant.types">ResourceFactory</A> targets, long granularity)</CODE> <BR> Tells which source files should be reprocessed based on the last modification date of target files.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../../org/apache/tools/ant/types/ResourceCollection.html" title="interface in org.apache.tools.ant.types">ResourceCollection</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.html#selectOutOfDateSources(org.apache.tools.ant.ProjectComponent, org.apache.tools.ant.types.ResourceCollection, org.apache.tools.ant.util.FileNameMapper, org.apache.tools.ant.types.ResourceFactory, long)">selectOutOfDateSources</A></B>(<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A> logTo, <A HREF="../../../../../org/apache/tools/ant/types/ResourceCollection.html" title="interface in org.apache.tools.ant.types">ResourceCollection</A> source, <A HREF="../../../../../org/apache/tools/ant/util/FileNameMapper.html" title="interface in org.apache.tools.ant.util">FileNameMapper</A> mapper, <A HREF="../../../../../org/apache/tools/ant/types/ResourceFactory.html" title="interface in org.apache.tools.ant.types">ResourceFactory</A> targets, long granularity)</CODE> <BR> Tells which sources should be reprocessed based on the last modification date of targets.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../../org/apache/tools/ant/types/ResourceCollection.html" title="interface in org.apache.tools.ant.types">ResourceCollection</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.html#selectSources(org.apache.tools.ant.ProjectComponent, org.apache.tools.ant.types.ResourceCollection, org.apache.tools.ant.util.FileNameMapper, org.apache.tools.ant.types.ResourceFactory, org.apache.tools.ant.util.ResourceUtils.ResourceSelectorProvider)">selectSources</A></B>(<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A> logTo, <A HREF="../../../../../org/apache/tools/ant/types/ResourceCollection.html" title="interface in org.apache.tools.ant.types">ResourceCollection</A> source, <A HREF="../../../../../org/apache/tools/ant/util/FileNameMapper.html" title="interface in org.apache.tools.ant.util">FileNameMapper</A> mapper, <A HREF="../../../../../org/apache/tools/ant/types/ResourceFactory.html" title="interface in org.apache.tools.ant.types">ResourceFactory</A> targets, <A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.ResourceSelectorProvider.html" title="interface in org.apache.tools.ant.util">ResourceUtils.ResourceSelectorProvider</A> selector)</CODE> <BR> Tells which sources should be reprocessed because the given selector selects at least one target.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.html#setLastModified(org.apache.tools.ant.types.resources.Touchable, long)">setLastModified</A></B>(<A HREF="../../../../../org/apache/tools/ant/types/resources/Touchable.html" title="interface in org.apache.tools.ant.types.resources">Touchable</A> t, long time)</CODE> <BR> Set the last modified time of an object implementing org.apache.tools.ant.types.resources.Touchable .</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="ResourceUtils()"><!-- --></A><H3> ResourceUtils</H3> <PRE> public <B>ResourceUtils</B>()</PRE> <DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="selectOutOfDateSources(org.apache.tools.ant.ProjectComponent, org.apache.tools.ant.types.Resource[], org.apache.tools.ant.util.FileNameMapper, org.apache.tools.ant.types.ResourceFactory)"><!-- --></A><H3> selectOutOfDateSources</H3> <PRE> public static <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A>[] <B>selectOutOfDateSources</B>(<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A> logTo, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A>[] source, <A HREF="../../../../../org/apache/tools/ant/util/FileNameMapper.html" title="interface in org.apache.tools.ant.util">FileNameMapper</A> mapper, <A HREF="../../../../../org/apache/tools/ant/types/ResourceFactory.html" title="interface in org.apache.tools.ant.types">ResourceFactory</A> targets)</PRE> <DL> <DD>Tells which source files should be reprocessed based on the last modification date of target files. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>logTo</CODE> - where to send (more or less) interesting output.<DD><CODE>source</CODE> - array of resources bearing relative path and last modification date.<DD><CODE>mapper</CODE> - filename mapper indicating how to find the target files.<DD><CODE>targets</CODE> - object able to map as a resource a relative path at <b>destination</b>. <DT><B>Returns:</B><DD>array containing the source files which need to be copied or processed, because the targets are out of date or do not exist.</DL> </DD> </DL> <HR> <A NAME="selectOutOfDateSources(org.apache.tools.ant.ProjectComponent, org.apache.tools.ant.types.Resource[], org.apache.tools.ant.util.FileNameMapper, org.apache.tools.ant.types.ResourceFactory, long)"><!-- --></A><H3> selectOutOfDateSources</H3> <PRE> public static <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A>[] <B>selectOutOfDateSources</B>(<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A> logTo, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A>[] source, <A HREF="../../../../../org/apache/tools/ant/util/FileNameMapper.html" title="interface in org.apache.tools.ant.util">FileNameMapper</A> mapper, <A HREF="../../../../../org/apache/tools/ant/types/ResourceFactory.html" title="interface in org.apache.tools.ant.types">ResourceFactory</A> targets, long granularity)</PRE> <DL> <DD>Tells which source files should be reprocessed based on the last modification date of target files. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>logTo</CODE> - where to send (more or less) interesting output.<DD><CODE>source</CODE> - array of resources bearing relative path and last modification date.<DD><CODE>mapper</CODE> - filename mapper indicating how to find the target files.<DD><CODE>targets</CODE> - object able to map as a resource a relative path at <b>destination</b>.<DD><CODE>granularity</CODE> - The number of milliseconds leeway to give before deciding a target is out of date. <DT><B>Returns:</B><DD>array containing the source files which need to be copied or processed, because the targets are out of date or do not exist.<DT><B>Since:</B></DT> <DD>Ant 1.6.2</DD> </DL> </DD> </DL> <HR> <A NAME="selectOutOfDateSources(org.apache.tools.ant.ProjectComponent, org.apache.tools.ant.types.ResourceCollection, org.apache.tools.ant.util.FileNameMapper, org.apache.tools.ant.types.ResourceFactory, long)"><!-- --></A><H3> selectOutOfDateSources</H3> <PRE> public static <A HREF="../../../../../org/apache/tools/ant/types/ResourceCollection.html" title="interface in org.apache.tools.ant.types">ResourceCollection</A> <B>selectOutOfDateSources</B>(<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A> logTo, <A HREF="../../../../../org/apache/tools/ant/types/ResourceCollection.html" title="interface in org.apache.tools.ant.types">ResourceCollection</A> source, <A HREF="../../../../../org/apache/tools/ant/util/FileNameMapper.html" title="interface in org.apache.tools.ant.util">FileNameMapper</A> mapper, <A HREF="../../../../../org/apache/tools/ant/types/ResourceFactory.html" title="interface in org.apache.tools.ant.types">ResourceFactory</A> targets, long granularity)</PRE> <DL> <DD>Tells which sources should be reprocessed based on the last modification date of targets. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>logTo</CODE> - where to send (more or less) interesting output.<DD><CODE>source</CODE> - ResourceCollection.<DD><CODE>mapper</CODE> - filename mapper indicating how to find the target Resources.<DD><CODE>targets</CODE> - object able to map a relative path as a Resource.<DD><CODE>granularity</CODE> - The number of milliseconds leeway to give before deciding a target is out of date. <DT><B>Returns:</B><DD>ResourceCollection.<DT><B>Since:</B></DT> <DD>Ant 1.7</DD> </DL> </DD> </DL> <HR> <A NAME="selectSources(org.apache.tools.ant.ProjectComponent, org.apache.tools.ant.types.ResourceCollection, org.apache.tools.ant.util.FileNameMapper, org.apache.tools.ant.types.ResourceFactory, org.apache.tools.ant.util.ResourceUtils.ResourceSelectorProvider)"><!-- --></A><H3> selectSources</H3> <PRE> public static <A HREF="../../../../../org/apache/tools/ant/types/ResourceCollection.html" title="interface in org.apache.tools.ant.types">ResourceCollection</A> <B>selectSources</B>(<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A> logTo, <A HREF="../../../../../org/apache/tools/ant/types/ResourceCollection.html" title="interface in org.apache.tools.ant.types">ResourceCollection</A> source, <A HREF="../../../../../org/apache/tools/ant/util/FileNameMapper.html" title="interface in org.apache.tools.ant.util">FileNameMapper</A> mapper, <A HREF="../../../../../org/apache/tools/ant/types/ResourceFactory.html" title="interface in org.apache.tools.ant.types">ResourceFactory</A> targets, <A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.ResourceSelectorProvider.html" title="interface in org.apache.tools.ant.util">ResourceUtils.ResourceSelectorProvider</A> selector)</PRE> <DL> <DD>Tells which sources should be reprocessed because the given selector selects at least one target. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>logTo</CODE> - where to send (more or less) interesting output.<DD><CODE>source</CODE> - ResourceCollection.<DD><CODE>mapper</CODE> - filename mapper indicating how to find the target Resources.<DD><CODE>targets</CODE> - object able to map a relative path as a Resource.<DD><CODE>selector</CODE> - returns a selector that is applied to target files. If it selects at least one target the source will be added to the returned collection. <DT><B>Returns:</B><DD>ResourceCollection.<DT><B>Since:</B></DT> <DD>Ant 1.8.0</DD> </DL> </DD> </DL> <HR> <A NAME="copyResource(org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.Resource)"><!-- --></A><H3> copyResource</H3> <PRE> public static void <B>copyResource</B>(<A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> source, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> dest) throws java.io.IOException</PRE> <DL> <DD>Convenience method to copy content from one Resource to another. No filtering is performed. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>source</CODE> - the Resource to copy from. Must not be <code>null</code>.<DD><CODE>dest</CODE> - the Resource to copy to. Must not be <code>null</code>. <DT><B>Throws:</B> <DD><CODE>java.io.IOException</CODE> - if the copying fails.<DT><B>Since:</B></DT> <DD>Ant 1.7</DD> </DL> </DD> </DL> <HR> <A NAME="copyResource(org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.Resource, org.apache.tools.ant.Project)"><!-- --></A><H3> copyResource</H3> <PRE> public static void <B>copyResource</B>(<A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> source, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> dest, <A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> project) throws java.io.IOException</PRE> <DL> <DD>Convenience method to copy content from one Resource to another. No filtering is performed. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>source</CODE> - the Resource to copy from. Must not be <code>null</code>.<DD><CODE>dest</CODE> - the Resource to copy to. Must not be <code>null</code>.<DD><CODE>project</CODE> - the project instance. <DT><B>Throws:</B> <DD><CODE>java.io.IOException</CODE> - if the copying fails.<DT><B>Since:</B></DT> <DD>Ant 1.7</DD> </DL> </DD> </DL> <HR> <A NAME="copyResource(org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.FilterSetCollection, java.util.Vector, boolean, boolean, java.lang.String, java.lang.String, org.apache.tools.ant.Project)"><!-- --></A><H3> copyResource</H3> <PRE> public static void <B>copyResource</B>(<A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> source, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> dest, <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A> filters, java.util.Vector filterChains, boolean overwrite, boolean preserveLastModified, java.lang.String inputEncoding, java.lang.String outputEncoding, <A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> project) throws java.io.IOException</PRE> <DL> <DD>Convenience method to copy content from one Resource to another specifying whether token filtering must be used, whether filter chains must be used, whether newer destination files may be overwritten and whether the last modified time of <code>dest</code> file should be made equal to the last modified time of <code>source</code>. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>source</CODE> - the Resource to copy from. Must not be <code>null</code>.<DD><CODE>dest</CODE> - the Resource to copy to. 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 Resource should be overwritten if it already exists.<DD><CODE>preserveLastModified</CODE> - Whether or not the last modified time of the destination Resource should be set to that of the source.<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. <DT><B>Throws:</B> <DD><CODE>java.io.IOException</CODE> - if the copying fails.<DT><B>Since:</B></DT> <DD>Ant 1.7</DD> </DL> </DD> </DL> <HR> <A NAME="copyResource(org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.FilterSetCollection, java.util.Vector, boolean, boolean, boolean, java.lang.String, java.lang.String, org.apache.tools.ant.Project)"><!-- --></A><H3> copyResource</H3> <PRE> public static void <B>copyResource</B>(<A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> source, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> dest, <A HREF="../../../../../org/apache/tools/ant/types/FilterSetCollection.html" title="class in org.apache.tools.ant.types">FilterSetCollection</A> filters, java.util.Vector filterChains, boolean overwrite, boolean preserveLastModified, boolean append, java.lang.String inputEncoding, java.lang.String outputEncoding, <A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> project) throws java.io.IOException</PRE> <DL> <DD>Convenience method to copy content from one Resource to another specifying whether token filtering must be used, whether filter chains must be used, whether newer destination files may be overwritten and whether the last modified time of <code>dest</code> file should be made equal to the last modified time of <code>source</code>. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>source</CODE> - the Resource to copy from. Must not be <code>null</code>.<DD><CODE>dest</CODE> - the Resource to copy to. 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 Resource should be overwritten if it already exists.<DD><CODE>preserveLastModified</CODE> - Whether or not the last modified time of the destination Resource should be set to that of the source.<DD><CODE>append</CODE> - Whether to append to an Appendable Resource.<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. <DT><B>Throws:</B> <DD><CODE>java.io.IOException</CODE> - if the copying fails.<DT><B>Since:</B></DT> <DD>Ant 1.8</DD> </DL> </DD> </DL> <HR> <A NAME="setLastModified(org.apache.tools.ant.types.resources.Touchable, long)"><!-- --></A><H3> setLastModified</H3> <PRE> public static void <B>setLastModified</B>(<A HREF="../../../../../org/apache/tools/ant/types/resources/Touchable.html" title="interface in org.apache.tools.ant.types.resources">Touchable</A> t, long time)</PRE> <DL> <DD>Set the last modified time of an object implementing org.apache.tools.ant.types.resources.Touchable . <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>t</CODE> - the Touchable whose modified time is to be set.<DD><CODE>time</CODE> - the time to which the last modified time is to be set. if this is -1, the current time is used.<DT><B>Since:</B></DT> <DD>Ant 1.7</DD> </DL> </DD> </DL> <HR> <A NAME="contentEquals(org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.Resource, boolean)"><!-- --></A><H3> contentEquals</H3> <PRE> public static boolean <B>contentEquals</B>(<A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> r1, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> r2, boolean text) throws java.io.IOException</PRE> <DL> <DD>Compares the contents of two Resources. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>r1</CODE> - the Resource whose content is to be compared.<DD><CODE>r2</CODE> - the other Resource whose content is to be compared.<DD><CODE>text</CODE> - true if the content is to be treated as text and differences in kind of line break are to be ignored. <DT><B>Returns:</B><DD>true if the content of the Resources is the same. <DT><B>Throws:</B> <DD><CODE>java.io.IOException</CODE> - if the Resources cannot be read.<DT><B>Since:</B></DT> <DD>Ant 1.7</DD> </DL> </DD> </DL> <HR> <A NAME="compareContent(org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.Resource, boolean)"><!-- --></A><H3> compareContent</H3> <PRE> public static int <B>compareContent</B>(<A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> r1, <A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> r2, boolean text) throws java.io.IOException</PRE> <DL> <DD>Compare the content of two Resources. A nonexistent Resource's content is "less than" that of an existing Resource; a directory-type Resource's content is "less than" that of a file-type Resource. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>r1</CODE> - the Resource whose content is to be compared.<DD><CODE>r2</CODE> - the other Resource whose content is to be compared.<DD><CODE>text</CODE> - true if the content is to be treated as text and differences in kind of line break are to be ignored. <DT><B>Returns:</B><DD>a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. <DT><B>Throws:</B> <DD><CODE>java.io.IOException</CODE> - if the Resources cannot be read.<DT><B>Since:</B></DT> <DD>Ant 1.7</DD> </DL> </DD> </DL> <HR> <A NAME="asFileResource(org.apache.tools.ant.types.resources.FileProvider)"><!-- --></A><H3> asFileResource</H3> <PRE> public static <A HREF="../../../../../org/apache/tools/ant/types/resources/FileResource.html" title="class in org.apache.tools.ant.types.resources">FileResource</A> <B>asFileResource</B>(<A HREF="../../../../../org/apache/tools/ant/types/resources/FileProvider.html" title="interface in org.apache.tools.ant.types.resources">FileProvider</A> fileProvider)</PRE> <DL> <DD>Convenience method to turn any fileProvider into a basic FileResource with the file's immediate parent as the basedir, for tasks that need one. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>fileProvider</CODE> - input <DT><B>Returns:</B><DD>fileProvider if it is a FileResource instance, or a new FileResource with fileProvider's file.<DT><B>Since:</B></DT> <DD>Ant 1.8</DD> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../org/apache/tools/ant/util/RegexpPatternMapper.html" title="class in org.apache.tools.ant.util"><B>PREV CLASS</B></A> <A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.ResourceSelectorProvider.html" title="interface in org.apache.tools.ant.util"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/tools/ant/util/ResourceUtils.html" target="_top"><B>FRAMES</B></A> <A HREF="ResourceUtils.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de