org.apache.tools.ant
Interface FileScanner
- DependScanner, DirectoryScanner, FTP.FTPDirectoryScanner, ZipScanner
public interface FileScanner
An interface used to describe the actions required of any type of
directory scanner.
void | addDefaultExcludes() - Adds default exclusions to the current exclusions set.
|
File | getBasedir() - Returns the base directory to be scanned.
|
String[] | getExcludedDirectories() - Returns the names of the directories which matched at least one of the
include patterns and at least one of the exclude patterns.
|
String[] | getExcludedFiles() - Returns the names of the files which matched at least one of the
include patterns and at least one of the exclude patterns.
|
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.
|
String[] | getNotIncludedDirectories() - Returns the names of the directories which matched none of the include
patterns.
|
String[] | getNotIncludedFiles() - Returns the names of the files which matched none of the include
patterns.
|
void | scan() - Scans the base directory for files which match at least one include
pattern and don't match any exclude patterns.
|
void | setBasedir(File basedir) - Sets the base directory to be scanned.
|
void | setBasedir(String basedir) - Sets the base directory to be scanned.
|
void | setCaseSensitive(boolean isCaseSensitive) - Sets whether or not the file system should be regarded as case sensitive.
|
void | setExcludes(String[] excludes) - Sets the list of exclude patterns to use.
|
void | setIncludes(String[] includes) - Sets the list of include patterns to use.
|
addDefaultExcludes
public void addDefaultExcludes()
Adds default exclusions to the current exclusions set.
getBasedir
public File getBasedir()
Returns the base directory to be scanned.
This is the directory which is scanned recursively.
- the base directory to be scanned
getExcludedDirectories
public String[] getExcludedDirectories()
Returns the names of the directories which matched at least one of the
include patterns and at least one of the exclude patterns.
The names are relative to the base directory.
- the names of the directories which matched at least one of the
include patterns and at least one of the exclude patterns.
getExcludedFiles
public String[] getExcludedFiles()
Returns the names of the files which matched at least one of the
include patterns and at least one of the exclude patterns.
The names are relative to the base directory.
- the names of the files which matched at least one of the
include patterns and at least one of the exclude patterns.
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.
- 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.
- the names of the files which matched at least one of the
include patterns and none of the exclude patterns.
getNotIncludedDirectories
public String[] getNotIncludedDirectories()
Returns the names of the directories which matched none of the include
patterns. The names are relative to the base directory.
- the names of the directories which matched none of the include
patterns.
getNotIncludedFiles
public String[] getNotIncludedFiles()
Returns the names of the files which matched none of the include
patterns. The names are relative to the base directory.
- the names of the files which matched none of the include
patterns.
scan
public void scan()
throws IllegalStateException
Scans the base directory for files which match at least one include
pattern and don't match any exclude patterns.
setBasedir
public void setBasedir(File basedir)
Sets the base directory to be scanned. This is the directory which is
scanned recursively.
basedir
- The base directory for scanning.
Should not be null
.
setBasedir
public void setBasedir(String basedir)
Sets the base directory to be scanned. This is the directory which is
scanned recursively. All '/' and '\' characters should be replaced by
File.separatorChar
, so the separator used need not match
File.separatorChar
.
basedir
- The base directory to scan.
Must not be null
.
setCaseSensitive
public void setCaseSensitive(boolean isCaseSensitive)
Sets whether or not the file system should be regarded as case sensitive.
isCaseSensitive
- whether or not the file system should be
regarded as a case sensitive one
setExcludes
public void setExcludes(String[] excludes)
Sets the list of exclude patterns to use.
excludes
- A list of exclude patterns.
May be null
, indicating that no files
should be excluded. If a non-null
list is
given, all elements must be non-null
.
setIncludes
public void setIncludes(String[] includes)
Sets the list of include patterns to use.
includes
- A list of include patterns.
May be null
, indicating that all files
should be included. If a non-null
list is given, all elements must be
non-null
.
Copyright B) 2000-2006 Apache Software Foundation. All Rights Reserved.