diff --git a/docs/manual/CoreTasks/copy.html b/docs/manual/CoreTasks/copy.html index 65f4bc728..fe4b76c32 100644 --- a/docs/manual/CoreTasks/copy.html +++ b/docs/manual/CoreTasks/copy.html @@ -20,13 +20,13 @@ Collections are used to select a group of files to copy. To use a resource collection, the todir attribute must be set.

-Note: If you employ filters in your copy operation, you should +Note: If you employ filters in your copy operation, you should limit the copy to text files. Binary files will be corrupted by the copy operation. -This applies whether the filters are implicitly defined by the +This applies whether the filters are implicitly defined by the filter task or explicitly provided to the copy operation as filtersets

- +

Parameters

@@ -229,13 +229,42 @@ in all files.

Collect all items from the current CLASSPATH setting into a destination directory, flattening the directory structure.

-  <copy todir="dest" flatten="true">
+  <copy todir="dest" flatten="true">
     <path>
-      <pathelement path="${java.class.path}"/>
+      <pathelement path="${java.class.path}"/>
     </path>
   </copy>
 
+

Copies some resources to a given directory.

+
+  <copy todir="dest" flatten="true">
+    <resources>
+      <file file="src_dir/file1.txt"/>
+      <url url="http://ant.apache.org/index.html"/>
+    </resources>
+  </copy>
+
+ +

Copies the two newest resources into a destination directory.

+
+  <typedef name="date" classname="org.apache.tools.ant.types.resources.comparators.Date"/>
+  <copy todir="${to.dir}" flatten="true">
+    <first count="2">
+      <sort>
+        <date/>
+        <resources>
+          <file file="${from.dir}/file1.txt"/>
+          <file file="${from.dir}/file2.txt"/>
+          <file file="${from.dir}/file3.txt"/>
+          <url url="http://ant.apache.org/index.html"/>
+        </resources>
+      </sort>
+    </first>
+  </copy>
+
+ +

Unix Note: File permissions are not retained when files are copied; they end up with the default UMASK permissions instead. This @@ -256,4 +285,3 @@ All rights Reserved.

-