public class CutDirsMapper extends java.lang.Object implements FileNameMapper
This mapper was inspired by a user-list thread that mentioned wget's --cut-dirs option.
| Constructor and Description | 
|---|
| CutDirsMapper() | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. | 
public void setDirs(int dirs)
dirs - intpublic 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. Might be null for resources that don't provide a
                       name.