org.apache.tools.ant
Interface FileScanner

All Known Implementing Classes:
DirectoryScanner

public interface FileScanner

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


Method Summary
 void addDefaultExcludes()
          Adds an array with default exclusions to the current exclusions set.
 java.io.File getBasedir()
          Gets the basedir that is used for scanning.
 java.lang.String[] getExcludedDirectories()
          Get the names of the directories that matched at least one of the include patterns, an matched also at least one of the exclude patterns.
 java.lang.String[] getExcludedFiles()
          Get the names of the files that matched at least one of the include patterns, an matched also at least one of the exclude patterns.
 java.lang.String[] getIncludedDirectories()
          Get the names of the directories that matched at least one of the include patterns, an matched none of the exclude patterns.
 java.lang.String[] getIncludedFiles()
          Get the names of the files that matched at least one of the include patterns, an matched none of the exclude patterns.
 java.lang.String[] getNotIncludedDirectories()
          Get the names of the directories that matched at none of the include patterns.
 java.lang.String[] getNotIncludedFiles()
          Get the names of the files that matched at none of the include patterns.
 void scan()
          Scans the base directory for files that match at least one include pattern, and don't match any exclude patterns.
 void setBasedir(java.io.File basedir)
          Sets the basedir for scanning.
 void setBasedir(java.lang.String basedir)
          Sets the basedir for scanning.
 void setCaseSensitive(boolean isCaseSensitive)
          Sets the case sensitivity of the file system
 void setExcludes(java.lang.String[] excludes)
          Sets the set of exclude patterns to use.
 void setIncludes(java.lang.String[] includes)
          Sets the set of include patterns to use.
 

Method Detail

addDefaultExcludes

public void addDefaultExcludes()
Adds an array with default exclusions to the current exclusions set.

getBasedir

public java.io.File getBasedir()
Gets the basedir that is used for scanning. This is the directory that is scanned recursively.
Returns:
the basedir that is used for scanning

getExcludedDirectories

public java.lang.String[] getExcludedDirectories()
Get the names of the directories that matched at least one of the include patterns, an matched also at least one of the exclude patterns. The names are relative to the basedir.
Returns:
the names of the directories

getExcludedFiles

public java.lang.String[] getExcludedFiles()
Get the names of the files that matched at least one of the include patterns, an matched also at least one of the exclude patterns. The names are relative to the basedir.
Returns:
the names of the files

getIncludedDirectories

public java.lang.String[] getIncludedDirectories()
Get the names of the directories that matched at least one of the include patterns, an matched none of the exclude patterns. The names are relative to the basedir.
Returns:
the names of the directories

getIncludedFiles

public java.lang.String[] getIncludedFiles()
Get the names of the files that matched at least one of the include patterns, an matched none of the exclude patterns. The names are relative to the basedir.
Returns:
the names of the files

getNotIncludedDirectories

public java.lang.String[] getNotIncludedDirectories()
Get the names of the directories that matched at none of the include patterns. The names are relative to the basedir.
Returns:
the names of the directories

getNotIncludedFiles

public java.lang.String[] getNotIncludedFiles()
Get the names of the files that matched at none of the include patterns. The names are relative to the basedir.
Returns:
the names of the files

scan

public void scan()
Scans the base directory for files that match at least one include pattern, and don't match any exclude patterns.
Throws:
java.lang.IllegalStateException - when basedir was set incorrecly

setBasedir

public void setBasedir(java.lang.String basedir)
Sets the basedir for scanning. This is the directory that is scanned recursively.
Parameters:
basedir - the (non-null) basedir for scanning

setBasedir

public void setBasedir(java.io.File basedir)
Sets the basedir for scanning. This is the directory that is scanned recursively.
Parameters:
basedir - the basedir for scanning

setExcludes

public void setExcludes(java.lang.String[] excludes)
Sets the set of exclude patterns to use.
Parameters:
excludes - list of exclude patterns

setIncludes

public void setIncludes(java.lang.String[] includes)
Sets the set of include patterns to use.
Parameters:
includes - list of include patterns

setCaseSensitive

public void setCaseSensitive(boolean isCaseSensitive)
Sets the case sensitivity of the file system
Parameters:
specifies - if the filesystem is case sensitive


Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.