PyFoam.RunDictionary.TimeDirectory module

Working with direcotries from a time-step

class PyFoam.RunDictionary.TimeDirectory.TimeDirectory(name, time, create=False, region=None, processor=None, tolerant=False, yieldParsedFiles=False)[source]

Bases: object

Represents a directory for a timestep

baseName()[source]

The name of the directory

clear()[source]

Wipe the directory clean

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

Copy SolutionFiles from another TimeDirectory to the current TimeDirectory. Returns a list with the copied values :param orig: the TimeDirectory with the original files :param purge: remove all current files in this directory :param overwrite: if the file already exists it is overwritten :param mustExist: only if the file already exists it is overwritten :param exclude: List of fnmatch-patterns that should be excluded (Default: none) :param include: List of fnmatch-patterns that should be included (Default: all)

getFiles()[source]

Get a list of the solution files in that directory

reread(force=False)[source]

Scan the directory for files with valid names