org.apache.tools.ant.taskdefs.optional

Class RenameExtensions

public class RenameExtensions extends MatchingTask

Deprecated: Use <move> instead

Version: 1.2

Constructor Summary
RenameExtensions()
Creates new RenameExtensions
Method Summary
voidexecute()
Executes the task.
voidsetFromExtension(String from)
The string that files must end in to be renamed
voidsetReplace(boolean replace)
store replace attribute - this determines whether the target file should be overwritten if present
voidsetSrcDir(File srcDir)
Set the source dir to find the files to be renamed.
voidsetToExtension(String to)
The string that renamed files will end with on completion

Constructor Detail

RenameExtensions

public RenameExtensions()
Creates new RenameExtensions

Method Detail

execute

public void execute()
Executes the task.

Throws: BuildException is there is a problem in the task execution.

setFromExtension

public void setFromExtension(String from)
The string that files must end in to be renamed

Parameters: from the extension of files being renamed.

setReplace

public void setReplace(boolean replace)
store replace attribute - this determines whether the target file should be overwritten if present

Parameters: replace if true overwrite any target files that exist.

setSrcDir

public void setSrcDir(File srcDir)
Set the source dir to find the files to be renamed.

Parameters: srcDir the source directory.

setToExtension

public void setToExtension(String to)
The string that renamed files will end with on completion

Parameters: to the extension of the renamed files.

Copyright