This task has been deprecated. Use the Copy task instead.
このタスクは推奨されません。 代わりに copy タスクを使ってください。
Copies a directory tree from the source to the destination.
一つのディレクトリツリーをコピー元からコピー先へコピーします。
It is possible to refine the set of files that are being copied. This can be done with the includes, includesfile, excludes, excludesfile and defaultexcludes attributes. With the includes or includesfile attribute you specify the files you want to have included by using patterns. The exclude or excludesfile attribute is used to specify the files you want to have excluded. This is also done with patterns. And finally with the defaultexcludes attribute, you can specify whether you want to use default exclusions or not. See the section on directory based tasks, on how the inclusion/exclusion of files works, and how to write patterns.
コピーされるファイルの集合を選択することが可能です。 includes、includesfile、excludes、excludesfile およびdefaultexcludes属性によりそれが可能です。 includes や includesfile 属性により、 パターンを使って選択したいファイルを指定します。 exclude や excludesfile 属性は除外したいファイルを指定するのに用いられます。 これもパターンにより指定します。 最後に、defaultexcludes 属性により、 デフォルト除外集合を使うかどうか指定できます。 ファイルの選択/除外の仕組みや、 パターンの書き方については、 ディレクトリベースのタスクの節をご覧ください。
This task forms an implicit FileSet and
supports all attributes of <fileset>
(dir becomes src) as well as the nested
<include>, <exclude> and
<patternset> elements.
このタスクは暗黙的な
ファイルセットを生成し、
ネストされた
<include>、<exclude>および
<patternset>要素と同様に
<fileset>
(dir は basedirとなります)
の全ての属性をサポートしています。
| Attribute | Description | Required |
| src | the directory to copy. | Yes |
| dest | the directory to copy to. | Yes |
| includes | comma- or space-separated list of patterns of files that must be included. All files are included when omitted. | No |
| includesfile | the name of a file. Each line of this file is taken to be an include pattern | No |
| excludes | comma- or space-separated list of patterns of files that must be excluded. No files (except default excludes) are excluded when omitted. | No |
| excludesfile | the name of a file. Each line of this file is taken to be an exclude pattern | No |
| defaultexcludes | indicates whether default excludes should be used or not ("yes"/"no"). Default excludes are used when omitted. | No |
| filtering | indicates whether token filtering should take place during the copy | No |
| flatten | ignore directory structure of source directory,
copy all files into a single directory, specified by the dest
attribute (default is false). |
No |
| forceoverwrite | overwrite existing files even if the destination files are newer (default is false). | No |
| 属性 | 説明 | 必須 |
| src | コピーするディレクトリ | Yes |
| dest | コピー先のディレクトリ | Yes |
| includes | カンマあるいは空白で区切られた選択されるファイルのパターンのリスト。省略された場合全てのファイルが選択される。 | No |
| includesfile | ファイルの名前。このファイルの各行が includes パターンとして扱われる | No |
| excludes | カンマあるいは空白で区切られた除外するファイルのパターンのリスト。省略された場合、(デフォルト除外ファイルを除き)何も除外しない。 | No |
| excludesfile | ファイルの名前。このファイルの各行が excludes パターンとして扱われる | No |
| defaultexcludes | デフォルト除外パターンを使うかどうか指定します。 ("yes"/"no") 省略された場合デフォルト除外パターンは使われます。 | No |
| filtering | コピー中にトークンフィルタを実行するか示します。 | No |
| flatten |
ソースディレクトリのディレクトリ構造を無視して、
全てのファイルを
dest
属性で指定された一つのディレクトリにコピーします。
(デフォルトはcode>false) |
No |
| forceoverwrite | コピー先のファイルが新しかったとしても、 既存のファイルを上書きします。 (デフォルトはfalse) | No |
<copydir src="${src}/resources"
dest="${dist}"
/>
copies the directory ${src}/resources to ${dist}.
ディレクトリ${src}/resourcesを
${dist}へコピーします。
<copydir src="${src}/resources"
dest="${dist}"
includes="**/*.java"
excludes="**/Test.java"
/>
copies the directory ${src}/resources to ${dist}
recursively. All java files are copied, except for files with the name Test.java.
ディレクトリ${src}/resourcesを
${dist}へ再帰的にコピーします。
Test.javaという名前のファイルを除いて全ての java ファイルがコピーされます。
<copydir src="${src}/resources"
dest="${dist}"
includes="**/*.java"
excludes="mypackage/test/**"/>
copies the directory ${src}/resources to ${dist}
recursively. All java files are copied, except for the files under the mypackage/test
directory.
ディレクトリ${src}/resourcesから
${dist}へ再帰的にコピーします。
mypackage/testディレクトリの下にあるファイルを除いて、
全ての java ファイルがコピーされます。
Copyright © 2000-2002,2004 The Apache Software Foundation. All rights Reserved.