@Deprecated
public class CopyNoLog
extends org.apache.tools.ant.Task
This implementation is based on Arnout Kuiper's initial design document, the following mailing list discussions, and the copyfile/copydir tasks.
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Hashtable<java.io.File,java.io.File> |
completeDirMap
Deprecated.
|
protected java.io.File |
destDir
Deprecated.
|
protected java.io.File |
destFile
Deprecated.
|
protected java.util.Hashtable<java.lang.String,java.lang.String[]> |
dirCopyMap
Deprecated.
|
protected boolean |
failonerror
Deprecated.
|
protected java.io.File |
file
Deprecated.
|
protected java.util.Hashtable<java.lang.String,java.lang.String[]> |
fileCopyMap
Deprecated.
|
protected java.util.Vector<org.apache.tools.ant.types.FileSet> |
filesets
Deprecated.
|
protected boolean |
filtering
Deprecated.
|
protected boolean |
flatten
Deprecated.
|
protected boolean |
forceOverwrite
Deprecated.
|
protected boolean |
includeEmpty
Deprecated.
|
protected org.apache.tools.ant.types.Mapper |
mapperElement
Deprecated.
|
protected boolean |
preserveLastModified
Deprecated.
|
protected int |
verbosity
Deprecated.
|
| Constructor and Description |
|---|
CopyNoLog()
Deprecated.
Copy task constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(org.apache.tools.ant.util.FileNameMapper fileNameMapper)
Deprecated.
A nested filenamemapper
|
void |
addFileset(org.apache.tools.ant.types.FileSet set)
Deprecated.
Adds a set of files to copy.
|
protected void |
buildMap(java.io.File fromDir,
java.io.File toDir,
java.lang.String[] names,
org.apache.tools.ant.util.FileNameMapper mapper,
java.util.Hashtable<java.lang.String,java.lang.String[]> map)
Deprecated.
Add to a map of files/directories to copy
|
org.apache.tools.ant.types.FilterChain |
createFilterChain()
Deprecated.
Adds a FilterChain.
|
org.apache.tools.ant.types.FilterSet |
createFilterSet()
Deprecated.
Adds a filterset.
|
org.apache.tools.ant.types.Mapper |
createMapper()
Deprecated.
Defines the mapper to map source to destination files.
|
protected void |
doFileOperations()
Deprecated.
Actually does the file (and possibly empty directory) copies.
|
void |
execute()
Deprecated.
Performs the copy operation.
|
java.lang.String |
getEncoding()
Deprecated.
|
protected org.apache.tools.ant.util.FileUtils |
getFileUtils()
Deprecated.
|
protected java.util.Vector<org.apache.tools.ant.types.FilterChain> |
getFilterChains()
Deprecated.
Get the filterchains being applied to this operation.
|
protected java.util.Vector<org.apache.tools.ant.types.FilterSet> |
getFilterSets()
Deprecated.
Get the filtersets being applied to this operation.
|
java.lang.String |
getOutputEncoding()
Deprecated.
|
boolean |
getPreserveLastModified()
Deprecated.
Whether to give the copied files the same last modified time as the original files.
|
boolean |
isEnableMultipleMapping()
Deprecated.
|
protected void |
scan(java.io.File fromDir,
java.io.File toDir,
java.lang.String[] files,
java.lang.String[] dirs)
Deprecated.
Compares source files to destination files to see if they should be copied.
|
void |
setEnableMultipleMappings(boolean enableMultipleMappings)
Deprecated.
Attribute to handle mappers that return multiple mappings for a given source path.
|
void |
setEncoding(java.lang.String encoding)
Deprecated.
Sets the character encoding
|
void |
setFailOnError(boolean failonerror)
Deprecated.
If false, note errors to the output but keep going.
|
void |
setFile(java.io.File file)
Deprecated.
Sets a single source file to copy.
|
void |
setFiltering(boolean filtering)
Deprecated.
If true, enables filtering.
|
void |
setFlatten(boolean flatten)
Deprecated.
When copying directory trees, the files can be "flattened" into a single directory.
|
void |
setGranularity(long granularity)
Deprecated.
The number of milliseconds leeway to give before deciding a target is out of date.
|
void |
setIncludeEmptyDirs(boolean includeEmpty)
Deprecated.
Used to copy empty directories.
|
void |
setOutputEncoding(java.lang.String encoding)
Deprecated.
Sets the character encoding for output files.
|
void |
setOverwrite(boolean overwrite)
Deprecated.
Overwrite any existing destination file(s).
|
void |
setPreserveLastModified(boolean preserve)
Deprecated.
Give the copied files the same last modified time as the original files.
|
void |
setPreserveLastModified(java.lang.String preserve)
Deprecated.
since ages - setPreserveLastModified(String) has been deprecated and replaced with setPreserveLastModified(boolean) to
consistently let the Introspection mechanism work.
|
void |
setTodir(java.io.File destDir)
Deprecated.
Sets the destination directory.
|
void |
setTofile(java.io.File destFile)
Deprecated.
Sets the destination file.
|
void |
setVerbose(boolean verbose)
Deprecated.
Used to force listing of all names of copied files.
|
protected void |
validateAttributes()
Deprecated.
Ensure we have a consistent and legal set of attributes, and set any internal flags necessary based on different
combinations of attributes.
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeprotected java.io.File file
protected java.io.File destFile
protected java.io.File destDir
protected java.util.Vector<org.apache.tools.ant.types.FileSet> filesets
protected boolean filtering
protected boolean preserveLastModified
protected boolean forceOverwrite
protected boolean flatten
protected int verbosity
protected boolean includeEmpty
protected boolean failonerror
protected java.util.Hashtable<java.lang.String,java.lang.String[]> fileCopyMap
protected java.util.Hashtable<java.lang.String,java.lang.String[]> dirCopyMap
protected java.util.Hashtable<java.io.File,java.io.File> completeDirMap
protected org.apache.tools.ant.types.Mapper mapperElement
protected org.apache.tools.ant.util.FileUtils getFileUtils()
public void setFile(java.io.File file)
file - the file to copypublic void setTofile(java.io.File destFile)
destFile - the file to copy topublic void setTodir(java.io.File destDir)
destDir - the destination directorypublic org.apache.tools.ant.types.FilterChain createFilterChain()
public org.apache.tools.ant.types.FilterSet createFilterSet()
@Deprecated public void setPreserveLastModified(java.lang.String preserve)
preserve - a boolean stringpublic void setPreserveLastModified(boolean preserve)
preserve - if true perverse the modified time, default is falsepublic boolean getPreserveLastModified()
protected java.util.Vector<org.apache.tools.ant.types.FilterSet> getFilterSets()
protected java.util.Vector<org.apache.tools.ant.types.FilterChain> getFilterChains()
public void setFiltering(boolean filtering)
filtering - if true enable filtering, default is falsepublic void setOverwrite(boolean overwrite)
overwrite - if set to true, force overwriting of destination file(s) even if the destination file(s) are younger than
the corresponding source file. Default is false.public void setFlatten(boolean flatten)
flatten - if true flatten the destination directory. Default is false.public void setVerbose(boolean verbose)
verbose - output the names of copied files. Default is false.public void setIncludeEmptyDirs(boolean includeEmpty)
includeEmpty - if true copy empty directories. Default is true.public void setEnableMultipleMappings(boolean enableMultipleMappings)
enableMultipleMappings - If true the task will copy to all the mappings for a given source path, if false, only the
first file or directory is processed. By default, this setting is false to provide backward compatibility with
earlier releases.public boolean isEnableMultipleMapping()
public void setFailOnError(boolean failonerror)
failonerror - true or falsepublic void addFileset(org.apache.tools.ant.types.FileSet set)
set - a set of files to copypublic org.apache.tools.ant.types.Mapper createMapper()
throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException - if more than one mapper is definedpublic void add(org.apache.tools.ant.util.FileNameMapper fileNameMapper)
fileNameMapper - the mapper to addpublic void setEncoding(java.lang.String encoding)
encoding - the character encodingpublic java.lang.String getEncoding()
null if not set.public void setOutputEncoding(java.lang.String encoding)
encoding - the character encodingpublic java.lang.String getOutputEncoding()
null if not set.public void setGranularity(long granularity)
Default is 0 milliseconds, or 2 seconds on DOS systems.
public void execute()
throws org.apache.tools.ant.BuildException
execute in class org.apache.tools.ant.Taskorg.apache.tools.ant.BuildException - if an error occursprotected void validateAttributes()
throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException - if an error occursprotected void scan(java.io.File fromDir,
java.io.File toDir,
java.lang.String[] files,
java.lang.String[] dirs)
fromDir - The source directorytoDir - The destination directoryfiles - A list of files to copydirs - A list of directories to copyprotected void buildMap(java.io.File fromDir,
java.io.File toDir,
java.lang.String[] names,
org.apache.tools.ant.util.FileNameMapper mapper,
java.util.Hashtable<java.lang.String,java.lang.String[]> map)
fromDir - the source directorytoDir - the destination directorynames - a list of filenamesmapper - a FileNameMapper valuemap - a map of source file to array of destination filesprotected void doFileOperations()
Copyright © 2018 SAP SE. All Rights Reserved.