Package org.apache.tools.ant
Interface FileScanner
- All Known Implementing Classes:
- ArchiveScanner,- DependScanner,- DirectoryScanner,- FTP.FTPDirectoryScanner,- FTPTaskMirrorImpl.FTPDirectoryScanner,- TarScanner,- ZipScanner
public interface FileScanner
An interface used to describe the actions required of any type of
 directory scanner.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds default exclusions to the current exclusions set.Returns the base directory to be scanned.String[]Returns the names of the directories which matched at least one of the include patterns and at least one of the exclude patterns.String[]Returns the names of the files which matched at least one of the include patterns and at least one of the exclude patterns.String[]Returns the names of the directories which matched at least one of the include patterns and none of the exclude patterns.String[]Returns the names of the files which matched at least one of the include patterns and none of the exclude patterns.String[]Returns the names of the directories which matched none of the include patterns.String[]Returns the names of the files which matched none of the include patterns.voidscan()Scans the base directory for files which match at least one include pattern and don't match any exclude patterns.voidsetBasedir(File basedir) Sets the base directory to be scanned.voidsetBasedir(String basedir) Sets the base directory to be scanned.voidsetCaseSensitive(boolean isCaseSensitive) Sets whether or not the file system should be regarded as case sensitive.voidsetExcludes(String[] excludes) Sets the list of exclude patterns to use.voidsetIncludes(String[] includes) Sets the list of include patterns to use.
- 
Method Details- 
addDefaultExcludesvoid addDefaultExcludes()Adds default exclusions to the current exclusions set.
- 
getBasedirFile getBasedir()Returns the base directory to be scanned. This is the directory which is scanned recursively.- Returns:
- the base directory to be scanned
 
- 
getExcludedDirectoriesString[] 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.- Returns:
- the names of the directories which matched at least one of the include patterns and at least one of the exclude patterns.
 
- 
getExcludedFilesString[] 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.- Returns:
- the names of the files which matched at least one of the include patterns and at least one of the exclude patterns.
 
- 
getIncludedDirectoriesString[] 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.- Returns:
- the names of the directories which matched at least one of the include patterns and none of the exclude patterns.
 
- 
getIncludedFilesString[] 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.- Returns:
- the names of the files which matched at least one of the include patterns and none of the exclude patterns.
 
- 
getNotIncludedDirectoriesString[] getNotIncludedDirectories()Returns the names of the directories which matched none of the include patterns. The names are relative to the base directory.- Returns:
- the names of the directories which matched none of the include patterns.
 
- 
getNotIncludedFilesString[] getNotIncludedFiles()Returns the names of the files which matched none of the include patterns. The names are relative to the base directory.- Returns:
- the names of the files which matched none of the include patterns.
 
- 
scanScans the base directory for files which match at least one include pattern and don't match any exclude patterns.- Throws:
- IllegalStateException- if the base directory was set incorrectly (i.e. if it is- null, doesn't exist, or isn't a directory).
 
- 
setBasedirSets the base directory to be scanned. This is the directory which is scanned recursively. All '/' and '\' characters should be replaced byFile.separatorChar, so the separator used need not matchFile.separatorChar.- Parameters:
- basedir- The base directory to scan. Must not be- null.
 
- 
setBasedirSets the base directory to be scanned. This is the directory which is scanned recursively.- Parameters:
- basedir- The base directory for scanning. Should not be- null.
 
- 
setExcludesSets the list of exclude patterns to use.- Parameters:
- excludes- A list of exclude patterns. May be- null, indicating that no files should be excluded. If a non-- nulllist is given, all elements must be non-- null.
 
- 
setIncludesSets the list of include patterns to use.- Parameters:
- includes- A list of include patterns. May be- null, indicating that all files should be included. If a non-- nulllist is given, all elements must be non-- null.
 
- 
setCaseSensitivevoid setCaseSensitive(boolean isCaseSensitive) Sets whether or not the file system should be regarded as case sensitive.- Parameters:
- isCaseSensitive- whether or not the file system should be regarded as a case sensitive one
 
 
-