Copyfile (Apache Ant API)

Package org.apache.tools.ant.taskdefs

## Class Copyfile

- java.lang.Object
- - org.apache.tools.ant.ProjectComponent
  - - org.apache.tools.ant.Task
    - - org.apache.tools.ant.taskdefs.Copyfile

- All Implemented Interfaces:
    `java.lang.Cloneable`

      @Deprecated
      public class Copyfile
      extends Task

  Deprecated.
  The copyfile task is deprecated since Ant 1.2. Use copy instead.
  Copies a file.
  Since:
    Ant 1.1

- - ### Field Summary

    - ### Fields inherited from class org.apache.tools.ant.Task

      `target, taskName, taskType, wrapper`

    - ### Fields inherited from class org.apache.tools.ant.ProjectComponent

      `description, location, project`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Copyfile()` | Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `execute()` | Deprecated. Execute the task.
    `void` | `setDest​(java.io.File dest)` | Deprecated. Set the destination file.
    `void` | `setFiltering​(java.lang.String filter)` | Deprecated. The filtering attribute.
    `void` | `setForceoverwrite​(boolean force)` | Deprecated. The forceoverwrite attribute.
    `void` | `setSrc​(java.io.File src)` | Deprecated. Set the source file.

    - ### Methods inherited from class org.apache.tools.ant.Task

      `bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`

    - ### Methods inherited from class org.apache.tools.ant.ProjectComponent

      `clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Copyfile

          public Copyfile()

      Deprecated.

  - ### Method Detail

    - #### setSrc

          public void setSrc​(java.io.File src)

      Deprecated.
      Set the source file.
      Parameters:
        `src` - the source file.

    - #### setForceoverwrite

          public void setForceoverwrite​(boolean force)

      Deprecated.
      The forceoverwrite attribute. Default is false.
      Parameters:
        `force` - if true overwrite even if the destination file is newer that the source file

    - #### setDest

          public void setDest​(java.io.File dest)

      Deprecated.
      Set the destination file.
      Parameters:
        `dest` - the destination file.

    - #### setFiltering

          public void setFiltering​(java.lang.String filter)

      Deprecated.
      The filtering attribute. Default is false.
      Parameters:
        `filter` - if true use filtering

    - #### execute

          public void execute()
                       throws BuildException

      Deprecated.
      Execute the task.
      Overrides:
        `execute` in class `Task`
      Throws:
        `BuildException` - on error