Top Description Methods
org.apache.tools.ant

public Interface FileScanner

Known Direct Implementers
org.apache.tools.ant.DirectoryScanner
Imports
java.io.File

An interface used to describe the actions required of any type of directory scanner.

Method Summary

Modifier and TypeMethod and Description
public void
addDefaultExcludes()

Adds default exclusions to the current exclusions set.

public File

Returns:

the base directory to be scanned
getBasedir
()

Returns the base directory to be scanned.

public String[]

Returns:

the names of the directories which matched at least one of the include patterns and at least one of the exclude patterns.
getExcludedDirectories
()

Returns the names of the directories which matched at least one of the include patterns and at least one of the exclude patterns.

public String[]

Returns:

the names of the files which matched at least one of the include patterns and at least one of the exclude patterns.
getExcludedFiles
()

Returns the names of the files which matched at least one of the include patterns and at least one of the exclude patterns.

public String[]

Returns:

the names of the directories which matched at least one of the include patterns and none of the exclude patterns.
getIncludedDirectories
()

Returns the names of the directories which matched at least one of the include patterns and none of the exclude patterns.

public String[]

Returns:

the names of the files which matched at least one of the include patterns and none of the exclude patterns.
getIncludedFiles
()

Returns the names of the files which matched at least one of the include patterns and none of the exclude patterns.

public String[]

Returns:

the names of the directories which matched none of the include patterns.
getNotIncludedDirectories
()

Returns the names of the directories which matched none of the include patterns.

public String[]

Returns:

the names of the files which matched none of the include patterns.
getNotIncludedFiles
()

Returns the names of the files which matched none of the include patterns.

public void
scan()

Scans the base directory for files which match at least one include pattern and don't match any exclude patterns.

public void
setBasedir(String
The base directory to scan. Must not be null.
basedir
)

Sets the base directory to be scanned.

public void
setBasedir(File
The base directory for scanning. Should not be null.
basedir
)

Sets the base directory to be scanned.

public void
setCaseSensitive(boolean
whether or not the file system should be regarded as a case sensitive one
isCaseSensitive
)

Sets whether or not the file system should be regarded as case sensitive.

public void
setExcludes(String[]
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.
excludes
)

Sets the list of exclude patterns to use.

public void
setIncludes(String[]
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.
includes
)

Sets the list of include patterns to use.

Method Detail

addDefaultExcludesback to summary
public void addDefaultExcludes()

Adds default exclusions to the current exclusions set.

getBasedirback to summary
public File getBasedir()

Returns the base directory to be scanned. This is the directory which is scanned recursively.

Returns:File

the base directory to be scanned

getExcludedDirectoriesback to summary
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.

Returns:String[]

the names of the directories which matched at least one of the include patterns and at least one of the exclude patterns.

getExcludedFilesback to summary
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.

Returns:String[]

the names of the files which matched at least one of the include patterns and at least one of the exclude patterns.

getIncludedDirectoriesback to summary
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.

Returns:String[]

the names of the directories which matched at least one of the include patterns and none of the exclude patterns.

getIncludedFilesback to summary
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.

Returns:String[]

the names of the files which matched at least one of the include patterns and none of the exclude patterns.

getNotIncludedDirectoriesback to summary
public String[] getNotIncludedDirectories()

Returns the names of the directories which matched none of the include patterns. The names are relative to the base directory.

Returns:String[]

the names of the directories which matched none of the include patterns.

getNotIncludedFilesback to summary
public String[] getNotIncludedFiles()

Returns the names of the files which matched none of the include patterns. The names are relative to the base directory.

Returns:String[]

the names of the files which matched none of the include patterns.

scanback to summary
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.

Exceptions
IllegalStateException:
if the base directory was set incorrectly (i.e. if it is null, doesn't exist, or isn't a directory).
setBasedirback to summary
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.

Parameters
basedir:String

The base directory to scan. Must not be null.

setBasedirback to summary
public void setBasedir(File basedir)

Sets the base directory to be scanned. This is the directory which is scanned recursively.

Parameters
basedir:File

The base directory for scanning. Should not be null.

setCaseSensitiveback to summary
public void setCaseSensitive(boolean isCaseSensitive)

Sets whether or not the file system should be regarded as case sensitive.

Parameters
isCaseSensitive:boolean

whether or not the file system should be regarded as a case sensitive one

setExcludesback to summary
public void setExcludes(String[] excludes)

Sets the list of exclude patterns to use.

Parameters
excludes:String[]

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.

setIncludesback to summary
public void setIncludes(String[] includes)

Sets the list of include patterns to use.

Parameters
includes:String[]

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.