Package bitten :: Package build :: Module api :: Class FileSet

Class FileSet

object --+
         |
        FileSet

Utility class for collecting a list of files in a directory that match given name/path patterns.
Instance Methods
 
__init__(self, basedir, include=None, exclude=None)
Create a file set.
 
__iter__(self)
Iterate over the names of all files in the set.
 
__contains__(self, filename)
Return whether the given file name is in the set.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  DEFAULT_EXCLUDES = ['CVS/*', '*/CVS/*', '.svn/*', '*/.svn/*', ...
Properties

Inherited from object: __class__

Method Details

__init__(self, basedir, include=None, exclude=None)
(Constructor)

 
Create a file set.
Parameters:
  • basedir - the base directory for all files in the set
  • include - a list of patterns that define which files should be included in the set
  • exclude - a list of patterns that define which files should be excluded from the set
Overrides: object.__init__

__contains__(self, filename)
(In operator)

 
Return whether the given file name is in the set.
Parameters:
  • filename - the name of the file to check

Class Variable Details

DEFAULT_EXCLUDES

Value:
['CVS/*', '*/CVS/*', '.svn/*', '*/.svn/*', '.DS_Store', 'Thumbs.db']