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

public Class RenameExtensions

extends MatchingTask
Class Inheritance
Annotations
@Deprecated
Imports
java.io.File, org.apache.tools.ant.BuildException, .Project, org.apache.tools.ant.taskdefs.MatchingTask, .Move, org.apache.tools.ant.types.Mapper

Deprecated

since 1.5.x. Use <move> instead

Version
1.2

Field Summary

Modifier and TypeField and Description
private String
private Mapper.MapperType
private boolean
private File
private String
Inherited from org.apache.tools.ant.taskdefs.MatchingTask:
fileset

Constructor Summary

AccessConstructor and Description
public
RenameExtensions()

Creates new RenameExtensions

Method Summary

Modifier and TypeMethod and Description
public void
execute()

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

Executes the task.
public void
setFromExtension(String
the extension of files being renamed.
from
)

The string that files must end in to be renamed

public void
setReplace(boolean
if true overwrite any target files that exist.
replace
)

store replace attribute - this determines whether the target file should be overwritten if present

public void
setSrcDir(File
the source directory.
srcDir
)

Set the source dir to find the files to be renamed.

public void
setToExtension(String
the extension of the renamed files.
to
)

The string that renamed files will end with on completion

Inherited from org.apache.tools.ant.taskdefs.MatchingTask:
addaddAndaddContainsaddContainsRegexpaddCustomaddDateaddDependaddDepthaddDifferentaddFilenameaddMajorityaddModifiedaddNoneaddNotaddOraddPresentaddSelectoraddSizeaddTypeappendSelectorcreateExcludecreateExcludesFilecreateIncludecreateIncludesFilecreatePatternSetgetDirectoryScannergetImplicitFileSetgetSelectorshasSelectorsselectorCountselectorElementssetCaseSensitivesetDefaultexcludessetExcludessetExcludesfilesetFollowSymlinkssetIncludessetIncludesfilesetProjectXsetIgnoreXsetItems

Field Detail

fromExtensionback to summary
private String fromExtension
globTypeback to summary
private Mapper.MapperType globType
replaceback to summary
private boolean replace
srcDirback to summary
private File srcDir
toExtensionback to summary
private String toExtension

Constructor Detail

RenameExtensionsback to summary
public RenameExtensions()

Creates new RenameExtensions

Method Detail

executeback to summary
public void execute() throws BuildException

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

Executes the task.

Exceptions
BuildException:
is there is a problem in the task execution.
setFromExtensionback to summary
public void setFromExtension(String from)

The string that files must end in to be renamed

Parameters
from:String

the extension of files being renamed.

setReplaceback to summary
public void setReplace(boolean replace)

store replace attribute - this determines whether the target file should be overwritten if present

Parameters
replace:boolean

if true overwrite any target files that exist.

setSrcDirback to summary
public void setSrcDir(File srcDir)

Set the source dir to find the files to be renamed.

Parameters
srcDir:File

the source directory.

setToExtensionback to summary
public void setToExtension(String to)

The string that renamed files will end with on completion

Parameters
to:String

the extension of the renamed files.