<filesystem : Move>

Description

Moves a file or directory to a new file or directory. By default, the destination file is overwritten if it already exists. When overwrite is turned off, then files are only moved if the source file is newer than the destination file, or when the destination file does not exist.

Source files and directories are only deleted when the file or directory has been copied to the destination successfully. Filtering also works.

This implementation is based on Arnout Kuiper's initial design document, the following mailing list discussions, and the copyfile/copydir tasks.

Parameters

Attribute Description Type Required?
flatten boolean ?
tofile File ?
encoding String ?
todir File ?
file File ?
verbose boolean ?
includeemptydirs boolean ?
overwrite boolean ?
enablemultiplemappings boolean ?
granularity long ?
outputencoding String ?
failonerror boolean ?
preservelastmodified boolean ?
filtering boolean ?

Parameters accepted as nested elements

<filterchain> ...

FilterChain may contain a chained set of filter readers.
Attribute Description Type Required
refid Makes this instance in effect a reference to another FilterChain instance.

You must not set another attribute or nest elements inside this element if you make it a reference.

Reference ?

<fileset> ...

Moved out of MatchingTask to make it a standalone object that could be referenced (by scripts for example).
Attribute Description Type Required
refid Reference ?
file File ?
dir File ?
defaultexcludes boolean ?
followsymlinks boolean ?
casesensitive boolean ?
excludes String ?
includesfile File ?
excludesfile File ?
includes String ?

<filterset> ...

A set of filters to be applied to something. A filter set may have begintoken and endtokens defined.
Attribute Description Type Required
begintoken Set the string used to id the beginning of a token. String ?
endtoken Set the string used to id the end of a token. String ?
refid Reference ?
recurse Set whether recursive token expansion is enabled. boolean ?
filtersfile Set the file containing the filters for this filterset. File ?

<mapper> ...

Element to define a FileNameMapper.
Attribute Description Type Required
classpath Set the classpath to load the FileNameMapper through (attribute). Path ?
classpathref Set the classpath to load the FileNameMapper through via reference (attribute). Reference ?
refid Make this Mapper instance a reference to another Mapper.

You must not set any other attribute if you make it a reference.

Reference ?
type Set the type of FileNameMapper to use. String ["identity", "flatten", "glob", "merge", "regexp", "package", "unpackage"] ?
classname Set the class name of the FileNameMapper to use. String ?
from Set the argument to FileNameMapper.setFrom String ?
to Set the argument to FileNameMapper.setTo String ?