org.apache.tools.ant.types
Class FileSet

java.lang.Object
  |
  +--org.apache.tools.ant.types.DataType
        |
        +--org.apache.tools.ant.types.FileSet
Direct Known Subclasses:
Tar.TarFileSet, ZipFileSet

public class FileSet
extends DataType

Moved out of MatchingTask to make it a standalone object that could be referenced (by scripts for example).

Author:
Arnout J. Kuiper ajkuiper@wxs.nl, Stefano Mazzocchi stefano@apache.org, Sam Ruby rubys@us.ibm.com, Jon S. Stevens jon@clearink.com, Stefan Bodewig

Fields inherited from class org.apache.tools.ant.types.DataType
checked, description, ref
 
Constructor Summary
  FileSet()
           
protected FileSet(FileSet fileset)
           
 
Method Summary
 PatternSet.NameEntry createExclude()
          add a name entry on the exclude list
 PatternSet.NameEntry createInclude()
          add a name entry on the include list
 PatternSet createPatternSet()
           
 java.io.File getDir(Project p)
           
 DirectoryScanner getDirectoryScanner(Project p)
          Returns the directory scanner needed to access the files to process.
protected  FileSet getRef(Project p)
          Performs the check for circular references and returns the referenced FileSet.
 void setDefaultexcludes(boolean useDefaultExcludes)
          Sets whether default exclusions should be used or not.
 void setDir(java.io.File dir)
           
 void setExcludes(java.lang.String excludes)
          Sets the set of exclude patterns.
 void setExcludesfile(java.io.File excl)
          Sets the name of the file containing the includes patterns.
 void setIncludes(java.lang.String includes)
          Sets the set of include patterns.
 void setIncludesfile(java.io.File incl)
          Sets the name of the file containing the includes patterns.
 void setRefid(Reference r)
          Makes this instance in effect a reference to another PatternSet instance.
 void setupDirectoryScanner(FileScanner ds, Project p)
           
 
Methods inherited from class org.apache.tools.ant.types.DataType
circularReference, dieOnCircularReference, getDescription, isReference, noChildrenAllowed, setDescription, tooManyAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSet

public FileSet()

FileSet

protected FileSet(FileSet fileset)
Method Detail

setRefid

public void setRefid(Reference r)
              throws BuildException
Makes this instance in effect a reference to another PatternSet instance.

You must not set another attribute or nest elements inside this element if you make it a reference.

Overrides:
setRefid in class DataType

setDir

public void setDir(java.io.File dir)
            throws BuildException

getDir

public java.io.File getDir(Project p)

createPatternSet

public PatternSet createPatternSet()

createInclude

public PatternSet.NameEntry createInclude()
add a name entry on the include list

createExclude

public PatternSet.NameEntry createExclude()
add a name entry on the exclude list

setIncludes

public void setIncludes(java.lang.String includes)
Sets the set of include patterns. Patterns may be separated by a comma or a space.
Parameters:
includes - the string containing the include patterns

setExcludes

public void setExcludes(java.lang.String excludes)
Sets the set of exclude patterns. Patterns may be separated by a comma or a space.
Parameters:
excludes - the string containing the exclude patterns

setIncludesfile

public void setIncludesfile(java.io.File incl)
                     throws BuildException
Sets the name of the file containing the includes patterns.
Parameters:
incl - The file to fetch the include patterns from.

setExcludesfile

public void setExcludesfile(java.io.File excl)
                     throws BuildException
Sets the name of the file containing the includes patterns.
Parameters:
excl - The file to fetch the exclude patterns from.

setDefaultexcludes

public void setDefaultexcludes(boolean useDefaultExcludes)
Sets whether default exclusions should be used or not.
Parameters:
useDefaultExcludes - "true"|"on"|"yes" when default exclusions should be used, "false"|"off"|"no" when they shouldn't be used.

getDirectoryScanner

public DirectoryScanner getDirectoryScanner(Project p)
Returns the directory scanner needed to access the files to process.

setupDirectoryScanner

public void setupDirectoryScanner(FileScanner ds,
                                  Project p)

getRef

protected FileSet getRef(Project p)
Performs the check for circular references and returns the referenced FileSet.


Copyright ? 2000 Apache Software Foundation. All Rights Reserved.