Package PyFoam :: Package RunDictionary :: Module TimeDirectory :: Class TimeDirectory
[hide private]
[frames] | no frames]

Class TimeDirectory

source code

object --+
         |
        TimeDirectory

Represents a directory for a timestep

Instance Methods [hide private]
 
__init__(self, name, time, create=False, region=None, processor=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
baseName(self)
The name of the directory
source code
 
reread(self, force=False)
Scan the directory for files with valid names
source code
 
getFiles(self)
Get a list of the solution files in that directory
source code
 
__contains__(self, item) source code
 
__len__(self) source code
 
__getitem__(self, key) source code
 
__remove(self, key) source code
 
__delitem__(self, key) source code
 
__setitem__(self, key, value) source code
 
__iter__(self) source code
 
clear(self)
Wipe the directory clean
source code
 
copy(self, orig, purge=False, overwrite=True, mustExist=False, exclude=[], include=['*'])
Copy SolutionFiles from another TimeDirectory to the current TimeDirectory.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, time, create=False, region=None, processor=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • name - name of the case directory
  • time - time in the directory
  • create - Create the directory if it does not exist
  • region - The mesh region for multi-region cases
Overrides: object.__init__

copy(self, orig, purge=False, overwrite=True, mustExist=False, exclude=[], include=['*'])

source code 

Copy SolutionFiles from another TimeDirectory to the current TimeDirectory. Returns a list with the copied values

Parameters:
  • orig - the TimeDirectory with the original files
  • purge - remove all current files in this directory
  • overwrite - if the file already exists it is overwritten
  • mustExist - only if the file already exists it is overwritten
  • exclude - List of fnmatch-patterns that should be excluded (Default: none)
  • include - List of fnmatch-patterns that should be included (Default: all)