org.apache.tools.ant.types.mappers

Class CutDirsMapper

public class CutDirsMapper extends Object implements FileNameMapper

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.

See Also: simplify copy with regexpmapper

Method Summary
String[]mapFileName(String sourceFileName)
{@inheritDoc }.
voidsetDirs(int dirs)
The number of leading directories to cut.
voidsetFrom(String ignore)
Empty implementation.
voidsetTo(String ignore)
Empty implementation.

Method Detail

mapFileName

public String[] mapFileName(String sourceFileName)
{@inheritDoc }.

setDirs

public void setDirs(int dirs)
The number of leading directories to cut.

setFrom

public void setFrom(String ignore)
Empty implementation.

Parameters: ignore ignored.

setTo

public void setTo(String ignore)
Empty implementation.

Parameters: ignore ignored.