org.apache.tools.ant.taskdefs

Class Rename

public class Rename extends Task

Deprecated: The rename task is deprecated since Ant 1.2. Use move instead.

Renames a file.

Since: Ant 1.1

Method Summary
voidexecute()
Renames the file src to dest
voidsetDest(File dest)
Sets the new name of the file.
voidsetReplace(String replace)
Sets whether an existing file should be replaced.
voidsetSrc(File src)
Sets the file to be renamed.

Method Detail

execute

public void execute()
Renames the file src to dest

Throws: org.apache.tools.ant.BuildException The exception is thrown, if the rename operation fails.

setDest

public void setDest(File dest)
Sets the new name of the file.

Parameters: dest the new name of the file.

setReplace

public void setReplace(String replace)
Sets whether an existing file should be replaced.

Parameters: replace on, if an existing file should be replaced.

setSrc

public void setSrc(File src)
Sets the file to be renamed.

Parameters: src the file to rename

Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.