| java.lang.Object org.apache.tools.ant.DirectoryScanner org.apache.tools.ant.types.ArchiveScanner
All known Subclasses: org.apache.tools.ant.types.ZipScanner, org.apache.tools.ant.types.TarScanner,
ArchiveScanner | abstract public class ArchiveScanner extends DirectoryScanner (Code) | | ArchiveScanner accesses the pattern matching algorithm in DirectoryScanner,
which are protected methods that can only be accessed by subclassing.
This implementation of FileScanner defines getIncludedFiles to return
the matching archive entries.
since: Ant 1.7 |
Field Summary | |
protected File | srcFile The archive file which should be scanned. |
srcFile | protected File srcFile(Code) | | The archive file which should be scanned.
|
fillMapsFromArchive | abstract protected void fillMapsFromArchive(Resource archive, String encoding, Map fileEntries, Map matchFileEntries, Map dirEntries, Map matchDirEntries)(Code) | | Fills the file and directory maps with resources read from the archive.
Parameters: archive - the archive to scan. Parameters: encoding - encoding used to encode file names inside the archive. Parameters: fileEntries - Map (name to resource) of non-directoryresources found inside the archive. Parameters: matchFileEntries - Map (name to resource) of non-directoryresources found inside the archive that matched all includepatterns and didn't match any exclude patterns. Parameters: dirEntries - Map (name to resource) of directoryresources found inside the archive. Parameters: matchDirEntries - Map (name to resource) of directoryresources found inside the archive that matched all includepatterns and didn't match any exclude patterns. |
getIncludedDirectories | public String[] getIncludedDirectories()(Code) | | Returns the names of the directories which matched at least one of the
include patterns and none of the exclude patterns.
The names are relative to the base directory.
the names of the directories which matched at least one of theinclude patterns and none of the exclude patterns. |
getIncludedDirsCount | public int getIncludedDirsCount()(Code) | | Override parent implementation.
count of included directories. since: Ant 1.7 |
getIncludedFiles | public String[] getIncludedFiles()(Code) | | Returns the names of the files which matched at least one of the
include patterns and none of the exclude patterns.
The names are relative to the base directory.
the names of the files which matched at least one of theinclude patterns and none of the exclude patterns. |
getIncludedFilesCount | public int getIncludedFilesCount()(Code) | | Override parent implementation.
count of included files. since: Ant 1.7 |
getResource | public Resource getResource(String name)(Code) | | Get the named Resource.
Parameters: name - path name of the file sought in the archive the resource since: Ant 1.5.2 |
getResourceDirectories | Iterator getResourceDirectories()(Code) | | Get the set of Resources that represent directories.
an Iterator of Resources. since: Ant 1.7 |
getResourceFiles | Iterator getResourceFiles()(Code) | | Get the set of Resources that represent files.
an Iterator of Resources. since: Ant 1.7 |
init | public void init()(Code) | | Initialize DirectoryScanner data structures.
|
match | public boolean match(String path)(Code) | | Matches a jar entry against the includes/excludes list,
normalizing the path separator.
Parameters: path - the (non-null) path name to test for inclusion true if the path should be includedfalse otherwise. |
scan | public void scan()(Code) | | Don't scan when we have no zipfile.
since: Ant 1.7 |
setEncoding | public void setEncoding(String encoding)(Code) | | Sets encoding of file names.
Parameters: encoding - the encoding format since: Ant 1.6 |
setSrc | public void setSrc(File srcFile)(Code) | | Sets the srcFile for scanning. This is the jar or zip file that
is scanned for matching entries.
Parameters: srcFile - the (non-null) archive file name for scanning |
setSrc | public void setSrc(Resource src)(Code) | | Sets the src for scanning. This is the jar or zip file that
is scanned for matching entries.
Parameters: src - the (non-null) archive resource |
trimSeparator | final protected static String trimSeparator(String s)(Code) | | Remove trailing slash if present.
Parameters: s - the file name to trim. the trimed file name. |
Methods inherited from org.apache.tools.ant.DirectoryScanner | public static boolean addDefaultExclude(String s)(Code)(Java Doc) public synchronized void addDefaultExcludes()(Code)(Java Doc) public synchronized void addExcludes(String[] excludes)(Code)(Java Doc) protected synchronized void clearResults()(Code)(Java Doc) protected boolean couldHoldIncluded(String name)(Code)(Java Doc) public synchronized File getBasedir()(Code)(Java Doc) public static String[] getDefaultExcludes()(Code)(Java Doc) public synchronized String[] getDeselectedDirectories()(Code)(Java Doc) public synchronized String[] getDeselectedFiles()(Code)(Java Doc) public synchronized String[] getExcludedDirectories()(Code)(Java Doc) public synchronized String[] getExcludedFiles()(Code)(Java Doc) public synchronized String[] getIncludedDirectories()(Code)(Java Doc) public synchronized int getIncludedDirsCount()(Code)(Java Doc) public synchronized String[] getIncludedFiles()(Code)(Java Doc) public synchronized int getIncludedFilesCount()(Code)(Java Doc) public synchronized String[] getNotIncludedDirectories()(Code)(Java Doc) public synchronized String[] getNotIncludedFiles()(Code)(Java Doc) public synchronized Resource getResource(String name)(Code)(Java Doc) public synchronized boolean isCaseSensitive()(Code)(Java Doc) public synchronized boolean isEverythingIncluded()(Code)(Java Doc) protected boolean isExcluded(String name)(Code)(Java Doc) public synchronized boolean isFollowSymlinks()(Code)(Java Doc) protected boolean isIncluded(String name)(Code)(Java Doc) protected boolean isSelected(String name, File file)(Code)(Java Doc) public static boolean match(String pattern, String str)(Code)(Java Doc) protected static boolean match(String pattern, String str, boolean isCaseSensitive)(Code)(Java Doc) protected static boolean matchPath(String pattern, String str)(Code)(Java Doc) protected static boolean matchPath(String pattern, String str, boolean isCaseSensitive)(Code)(Java Doc) protected static boolean matchPatternStart(String pattern, String str)(Code)(Java Doc) protected static boolean matchPatternStart(String pattern, String str, boolean isCaseSensitive)(Code)(Java Doc) public static boolean removeDefaultExclude(String s)(Code)(Java Doc) public static void resetDefaultExcludes()(Code)(Java Doc) public void scan() throws IllegalStateException(Code)(Java Doc) protected void scandir(File dir, String vpath, boolean fast)(Code)(Java Doc) public void setBasedir(String basedir)(Code)(Java Doc) public synchronized void setBasedir(File basedir)(Code)(Java Doc) public synchronized void setCaseSensitive(boolean isCaseSensitive)(Code)(Java Doc) public synchronized void setExcludes(String[] excludes)(Code)(Java Doc) public synchronized void setFollowSymlinks(boolean followSymlinks)(Code)(Java Doc) public synchronized void setIncludes(String[] includes)(Code)(Java Doc) public synchronized void setSelectors(FileSelector[] selectors)(Code)(Java Doc) protected void slowScan()(Code)(Java Doc)
|
|
|