Name
copy
Synopsis
Copies files and directories to new locations. A file is copied when the destination file does not exist or when the source file is newer than the destination.
Attributes
-
file(all, File, *) Specifies a single file to copy. Use nested
<fileset>s to copy multiple files.-
filtering(all, boolean, N) If
true, token filtering (see thefiltertask) using any global buildfile filters takes place. Nested filters that are specified using<filterset>are always applied, regardless of this attribute. Defaults tofalse.-
flatten(all, boolean, N) If
true, the directory structure of the source files is not preserved, and all files are copied to a single destination directory. You can achieve the same results using a nested<mapper>. Defaults tofalse.-
includeemptydirs(all, boolean, N) If
true, empty directories are also copied. Defaults totrue.-
overwrite(all, boolean, N) If
true, files are copied even when destination files are newer. Defaults tofalse.-
preservelastmodified(1.3, 1.4, String, N) If
true, destination files are given the same last modified timestamp as source files. Defaults tofalse.-
todir(all, File, *) The destination directory to which files are copied.
-
tofile(all, File, *) The destination file, applicable only when a single file is copied using the
fileattribute.
Either the file attribute must be set, or at least
one nested <fileset> must be specified. When
the file attribute is set, either the
todir or tofile attribute is
required. When nested <fileset> elements ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access