|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.types.mappers.CutDirsMapper
public class CutDirsMapper
A mapper that strips of the a configurable number of leading directories from a file name.
This mapper was inspired by a user-list thread that mentioned wget's --cut-dirs option.
| Constructor Summary | |
|---|---|
CutDirsMapper()
|
|
| Method Summary | |
|---|---|
java.lang.String[] |
mapFileName(java.lang.String sourceFileName)
Returns an array containing the target filename(s) for the given source file. |
void |
setDirs(int dirs)
The number of leading directories to cut. |
void |
setFrom(java.lang.String ignore)
Empty implementation. |
void |
setTo(java.lang.String ignore)
Empty implementation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CutDirsMapper()
| Method Detail |
|---|
public void setDirs(int dirs)
public void setFrom(java.lang.String ignore)
setFrom in interface FileNameMapperignore - ignored.public void setTo(java.lang.String ignore)
setTo in interface FileNameMapperignore - ignored.public java.lang.String[] mapFileName(java.lang.String sourceFileName)
if the given rule doesn't apply to the source file, implementation must return null. SourceFileScanner will then omit the source file in question.
.
mapFileName in interface FileNameMappersourceFileName - the name of the source file relative to
some given basedirectory.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||