Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.taskdefs
Class Rename

    java.lang.Object
      org.apache.tools.ant.ProjectComponent
          org.apache.tools.ant.Task
              org.apache.tools.ant.taskdefs.Rename

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

public class Rename
extends Task

Renames a file.

Since:
  Ant 1.1
Author:
  haas@softwired.ch

Field Summary

Fields inherited from class org.apache.tools.ant.Task
`description, location, target, taskName, taskType, wrapper`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`project`

Constructor Summary
`Rename()` Deprecated.

Method Summary
`void` | `execute()` Deprecated. Renames the file `src` to `dest`
`void` | `setDest(java.io.File dest)` Deprecated. Sets the new name of the file.
`void` | `setReplace(java.lang.String replace)` Deprecated. Sets whether an existing file should be replaced.
`void` | `setSrc(java.io.File src)` Deprecated. Sets the file to be renamed.

Methods inherited from class org.apache.tools.ant.Task
`getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`getProject, setProject`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Rename

    public Rename()

  Deprecated.

Method Detail

### setSrc

    public void setSrc(java.io.File src)

  Deprecated.
  Sets the file to be renamed.

  Parameters:
    `src` - the file to rename

### setDest

    public void setDest(java.io.File dest)

  Deprecated.
  Sets the new name of the file.

  Parameters:
    `dest` - the new name of the file.

### setReplace

    public void setReplace(java.lang.String replace)

  Deprecated.
  Sets whether an existing file should be replaced.

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

### execute

    public void execute()
                 throws BuildException

  Deprecated.
  Renames the file `src` to `dest`

  Overrides:
    `execute` in class `Task`
  Throws:
    `BuildException` - The exception is thrown, if the rename operation fails.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.