Open Source .NET Development [Electronic resources]

Brian Nantz

نسخه متنی -صفحه : 275/ 130
نمايش فراداده

<copy>Copies a file or fileset to a new file or directory.

Files are only copied if the source file is newer than the destination file or if the destination file does not exist. However, you can explicitly overwrite files with the overwrite attribute.

Filesets are used to select files to copy. To use a fileset, the todir attribute must be set.

Attribute

Description

Required

file

The file to copy.

False

tofile

The file to copy to.

False

todir

The directory to copy to.

False

overwrite

Overwrite existing files even if the destination files are newer. Defaults to "false."

False

failonerror

Determines whether task failure stops the build or is just reported. Default is "true."

False

verbose

Task reports detailed build log messages. Default is "false."

False

if

If true then the task will be executed; otherwise skipped. Default is "true."

False

unless

Opposite of if. If false then the task will be executed; otherwise skipped. Default is "false."

False

Example

<copy todir="${build.dir}"> <fileset basedir="bin"> <includes name="*.dll"/> </fileset> </copy>