Package org.apache.tools.ant.util
Class FlatFileNameMapper
- java.lang.Object
-
- org.apache.tools.ant.util.FlatFileNameMapper
-
- All Implemented Interfaces:
FileNameMapper
public class FlatFileNameMapper extends java.lang.Object implements FileNameMapper
Implementation of FileNameMapper that always returns the source file name without any leading directory information.This is the default FileNameMapper for the copy and move tasks if the flatten attribute has been set.
-
-
Constructor Summary
Constructors Constructor Description FlatFileNameMapper()
-
Method Summary
Modifier and Type Method Description java.lang.String[]mapFileName(java.lang.String sourceFileName)Returns an one-element array containing the source file name without any leading directory information.voidsetFrom(java.lang.String from)Ignored.voidsetTo(java.lang.String to)Ignored.
-
-
-
Method Detail
-
setFrom
public void setFrom(java.lang.String from)
Ignored.- Specified by:
setFromin interfaceFileNameMapper- Parameters:
from- ignored.
-
setTo
public void setTo(java.lang.String to)
Ignored.- Specified by:
setToin interfaceFileNameMapper- Parameters:
to- ignored.
-
mapFileName
public java.lang.String[] mapFileName(java.lang.String sourceFileName)
Returns an one-element array containing the source file name without any leading directory information.- Specified by:
mapFileNamein interfaceFileNameMapper- Parameters:
sourceFileName- the name to map.- Returns:
- the file name in a one-element array.
-
-