diff --git a/docs/manual/CoreTasks/copy.html b/docs/manual/CoreTasks/copy.html index ff95b4cee..acfbcfded 100644 --- a/docs/manual/CoreTasks/copy.html +++ b/docs/manual/CoreTasks/copy.html @@ -33,7 +33,12 @@ overwrite files with the overwrite attribute.

Resource Collections are used to select a group of files to copy. To use a -resource collection, the todir attribute must be set.

+resource collection, the todir attribute must be set. +Note that some resources (for example +the file resource) +return absolute paths as names and the result of using them without +using a nested mapper (or the flatten attribute) may not be what you +expect.

Note: If you employ filters in your copy operation, @@ -153,6 +158,7 @@ operation as filtersets. systems. This can also be useful if source and target files live on separate machines with clocks being out of sync. since Ant 1.6.2. + No

Parameters specified as nested elements

@@ -263,6 +269,13 @@ destination directory, flattening the directory structure.

</copy> +

If the example above didn't use the flatten attribute, + the <file> resource would have returned its full + path as source and target name and would not have been copied at + all. In general it is a good practice to use an explicit mapper + together with resources that use an absolute path as their + names.

+

Copies the two newest resources into a destination directory.

   <copy todir="dest" flatten="true">
@@ -280,6 +293,8 @@ destination directory, flattening the directory structure.

</copy>
+

The paragraph following the previous example applies to this + example as well.

Unix Note: File permissions are not retained when files are copied; they end up with the default UMASK permissions diff --git a/src/tests/antunit/taskdefs/copy-test.xml b/src/tests/antunit/taskdefs/copy-test.xml index 37aa00b7e..91db6fb5d 100644 --- a/src/tests/antunit/taskdefs/copy-test.xml +++ b/src/tests/antunit/taskdefs/copy-test.xml @@ -24,24 +24,6 @@ - - - - - - - - - - - - - - - - - -