org.apache.tools.ant.types
Class ZipScanner
- FileScanner, ResourceFactory, SelectorScanner
ZipScanner 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 Zip entries.
protected File | srcFile - The zip file which should be scanned.
|
DEFAULTEXCLUDES , basedir , dirsDeselected , dirsExcluded , dirsIncluded , dirsNotIncluded , everythingIncluded , excludes , filesDeselected , filesExcluded , filesIncluded , filesNotIncluded , haveSlowResults , includes , isCaseSensitive , selectors |
String[] | getIncludedDirectories() - Returns the names of the directories which matched at least one of the
include patterns and none of the exclude patterns.
|
String[] | getIncludedFiles() - Returns the names of the files which matched at least one of the
include patterns and none of the exclude patterns.
|
Resource | getResource(String name)
|
void | init() - Initialize DirectoryScanner data structures.
|
boolean | match(String path) - Matches a jar entry against the includes/excludes list,
normalizing the path separator.
|
void | setEncoding(String encoding) - Sets encoding of file names.
|
void | setSrc(File srcFile) - Sets the srcFile for scanning.
|
addDefaultExclude , addDefaultExcludes , addExcludes , clearResults , couldHoldIncluded , getBasedir , getDefaultExcludes , getDeselectedDirectories , getDeselectedFiles , getExcludedDirectories , getExcludedFiles , getIncludedDirectories , getIncludedDirsCount , getIncludedFiles , getIncludedFilesCount , getNotIncludedDirectories , getNotIncludedFiles , getResource , isCaseSensitive , isEverythingIncluded , isExcluded , isFollowSymlinks , isIncluded , isSelected , match , match , matchPath , matchPath , matchPatternStart , matchPatternStart , removeDefaultExclude , resetDefaultExcludes , scan , scandir , setBasedir , setBasedir , setCaseSensitive , setExcludes , setFollowSymlinks , setIncludes , setSelectors , slowScan |
srcFile
protected File srcFile
The zip file which should be scanned.
getIncludedDirectories
public String[] getIncludedDirectories()
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.
- getIncludedDirectories in interface FileScanner
- getIncludedDirectories in interface DirectoryScanner
- the names of the directories which matched at least one of the
include patterns and none of the exclude patterns.
getIncludedFiles
public String[] getIncludedFiles()
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.
- getIncludedFiles in interface FileScanner
- getIncludedFiles in interface DirectoryScanner
- the names of the files which matched at least one of the
include patterns and none of the exclude patterns.
init
public void init()
Initialize DirectoryScanner data structures.
match
public boolean match(String path)
Matches a jar entry against the includes/excludes list,
normalizing the path separator.
path
- the (non-null) path name to test for inclusion
true
if the path should be included
false
otherwise.
setEncoding
public void setEncoding(String encoding)
Sets encoding of file names.
setSrc
public void setSrc(File srcFile)
Sets the srcFile for scanning. This is the jar or zip file that
is scanned for matching entries.
srcFile
- the (non-null) zip file name for scanning
Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.