Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs

public Class CopyPath

extends Task
Class Inheritance
Annotations
@Deprecated
Imports
java.io.File, .IOException, org.apache.tools.ant.BuildException, .Project, .Task, org.apache.tools.ant.types.Path, .Reference, org.apache.tools.ant.util.FileNameMapper, .FileUtils

Deprecated

this task should have never been released and was obsoleted by ResourceCollection support in Copy available since Ant 1.7.0. Don't use it.

Copy the contents of a path to a destination, using the mapper of choice
Since
Ant 1.7.0

Field Summary

Modifier and TypeField and Description
private File
public static final String
ERROR_NO_DESTDIR

No destdir attribute

public static final String
ERROR_NO_MAPPER

No mapper

public static final String
private static final FileUtils
private long
private FileNameMapper
private Path
private boolean
Inherited from org.apache.tools.ant.Task:
targettaskNametaskTypewrapper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(FileNameMapper
the mapper to add.
newmapper
)

add a mapper

public Path

Returns:

a path to be configured.
createPath
()

Create a path.

public void
execute()

Overrides org.apache.tools.ant.Task.execute.

This is a very minimal derivative of the normal copy logic.
public void
setDestDir(File
the value of the destdir attribute.
destDir
)

The dest dir attribute.

public void
setGranularity(long
the granularity used to decide if a target is out of date.
granularity
)

Set the number of milliseconds leeway to give before deciding a target is out of date.

public void
setPath(Path
an Ant Path object containing the path.
s
)

Set the path to be used when running the Java class.

public void
setPathRef(Reference
a reference to an existing path.
r
)

Set the path to use by reference.

public void
setPreserveLastModified(boolean
if true preserve the modified time; default is false.
preserveLastModified
)

Give the copied files the same last modified time as the original files.

protected void
validateAttributes()

Ensure we have a consistent and legal set of attributes, and set any internal flags necessary based on different combinations of attributes.

Inherited from org.apache.tools.ant.Task:
bindToOwnergetOwningTargetgetRuntimeConfigurableWrappergetTaskNamegetTaskTypegetWrapperhandleErrorFlushhandleErrorOutputhandleFlushhandleInputhandleOutputinitisInvalidloglogloglogmaybeConfigureperformreconfiguresetOwningTargetsetRuntimeConfigurableWrappersetTaskNamesetTaskType

Field Detail

destDirback to summary
private File destDir
ERROR_NO_DESTDIRback to summary
public static final String ERROR_NO_DESTDIR

No destdir attribute

ERROR_NO_MAPPERback to summary
public static final String ERROR_NO_MAPPER

No mapper

ERROR_NO_PATHback to summary
public static final String ERROR_NO_PATH

No path

FILE_UTILSback to summary
private static final FileUtils FILE_UTILS
granularityback to summary
private long granularity
Annotations
@SuppressWarnings:unused
mapperback to summary
private FileNameMapper mapper
pathback to summary
private Path path
preserveLastModifiedback to summary
private boolean preserveLastModified

Constructor Detail

CopyPathback to summary
public CopyPath()

Method Detail

addback to summary
public void add(FileNameMapper newmapper)

add a mapper

Parameters
newmapper:FileNameMapper

the mapper to add.

createPathback to summary
public Path createPath()

Create a path.

Returns:Path

a path to be configured.

executeback to summary
public void execute() throws BuildException

Overrides org.apache.tools.ant.Task.execute.

This is a very minimal derivative of the normal copy logic.

Exceptions
BuildException:
if something goes wrong with the build.
setDestDirback to summary
public void setDestDir(File destDir)

The dest dir attribute.

Parameters
destDir:File

the value of the destdir attribute.

setGranularityback to summary
public void setGranularity(long granularity)

Set the number of milliseconds leeway to give before deciding a target is out of date. TODO: This is not yet used.

Parameters
granularity:long

the granularity used to decide if a target is out of date.

setPathback to summary
public void setPath(Path s)

Set the path to be used when running the Java class.

Parameters
s:Path

an Ant Path object containing the path.

setPathRefback to summary
public void setPathRef(Reference r)

Set the path to use by reference.

Parameters
r:Reference

a reference to an existing path.

setPreserveLastModifiedback to summary
public void setPreserveLastModified(boolean preserveLastModified)

Give the copied files the same last modified time as the original files.

Parameters
preserveLastModified:boolean

if true preserve the modified time; default is false.

validateAttributesback to summary
protected void validateAttributes() throws BuildException

Ensure we have a consistent and legal set of attributes, and set any internal flags necessary based on different combinations of attributes.

Exceptions
BuildException:
if an error occurs.