Method Summary |
|
public void | add(ResourceCollection res) Add a collection of files to copy. |
public void | add(FileNameMapper fileNameMapper) Add a nested filenamemapper. |
public void | addFileset(FileSet set) Add a set of files to copy. |
protected void | buildMap(File fromDir, File toDir, String[] names, FileNameMapper mapper, Hashtable map) Add to a map of files/directories to copy. |
protected Map | buildMap(Resource[] fromResources, File toDir, FileNameMapper mapper) Create a map of resources to copy.
Parameters: fromResources - The source resources. Parameters: toDir - the destination directory. Parameters: mapper - a FileNameMapper value. |
public FilterChain | createFilterChain() Add a FilterChain. |
public FilterSet | createFilterSet() Add a filterset. |
public Mapper | createMapper() Define the mapper to map source to destination files. |
protected void | doFileOperations() Actually does the file (and possibly empty directory) copies. |
protected void | doResourceOperations(Map map) Actually does the resource copies. |
public void | execute() Perform the copy operation. |
public String | getEncoding() Get the character encoding to be used. |
protected FileUtils | getFileUtils() Get the FileUtils for this task. |
protected Vector | getFilterChains() Get the filterchains being applied to this operation. |
protected Vector | getFilterSets() Get the filtersets being applied to this operation. |
public String | getOutputEncoding() Get the character encoding for output files. |
public boolean | getPreserveLastModified() Get whether to give the copied files the same last modified time as
the original files. |
public boolean | isEnableMultipleMapping() Get whether multiple mapping is enabled. |
protected void | scan(File fromDir, File toDir, String[] files, String[] dirs) Compares source files to destination files to see if they should be
copied. |
protected Map | scan(Resource[] fromResources, File toDir) Compares source resources to destination files to see if they
should be copied.
Parameters: fromResources - The source resources. Parameters: toDir - The destination directory. |
public void | setEnableMultipleMappings(boolean enableMultipleMappings) Set method of handling mappers that return multiple
mappings for a given source path. |
public void | setEncoding(String encoding) Set the character encoding. |
public void | setFailOnError(boolean failonerror) Set whether to fail when errors are encountered. |
public void | setFile(File file) Set a single source file to copy. |
public void | setFiltering(boolean filtering) Set filtering mode. |
public void | setFlatten(boolean flatten) Set whether files copied from directory trees will be "flattened"
into a single directory. |
public void | setGranularity(long granularity) Set the number of milliseconds leeway to give before deciding a
target is out of date. |
public void | setIncludeEmptyDirs(boolean includeEmpty) Set whether to copy empty directories.
Parameters: includeEmpty - if true copy empty directories. |
public void | setOutputEncoding(String encoding) Set the character encoding for output files. |
public void | setOverwrite(boolean overwrite) Set overwrite mode regarding existing destination file(s).
Parameters: overwrite - if true force overwriting of destination file(s)even if the destination file(s) are younger thanthe corresponding source file. |
public void | setPreserveLastModified(String preserve) Give the copied files the same last modified time as the original files. |
public void | setPreserveLastModified(boolean preserve) Give the copied files the same last modified time as the original files. |
public void | setTodir(File destDir) Set the destination directory. |
public void | setTofile(File destFile) Set the destination file. |
public void | setVerbose(boolean verbose) Set verbose mode. |
protected boolean | supportsNonFileResources() Whether this task can deal with non-file resources.
<copy> can while <move> can't since we don't
know how to remove non-file resources.
This implementation returns true only if this task is
<copy>. |
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. |