Class f.i.DirPath(str, object):

Part of fixture.io View In Hierarchy

Known subclasses: fixture.io.DeletableDirPath

a directory path.

The instance will function exactly like a string but is enhanced with a few common methods from os.path. Note that path.split() is implemented as self.splitpath() since otherwise paths may not work right in other applications.

Method __init__ Undocumented
Method __setattr__ self.new_directory = "rel/path/to/directory"
Method _wrap Undocumented
Method abspath os.path.abspath(self)
Method basename os.path.basename(self)
Method dirname os.path.dirname(self)
Method exists os.path.exists(self)
Method join os.path.join(self, *dirs)
Method mkdir makes a directory in the root and returns its full path.
Method normpath os.path.normpath(self)
Method putfile puts new filename relative to your TempIO root.
Method realpath os.path.realpath(self)
Method splitext os.path.splitext(self)
Method splitpath os.path.split(self)
def __init__(self, path):
Undocumented
def __setattr__(self, name, val):
self.new_directory = "rel/path/to/directory"

a new attribute will be created as a relative directory and the value will be stored as a new DirPath object.

def _wrap(self, path):
Undocumented
def abspath(self):
os.path.abspath(self)
def basename(self):
os.path.basename(self)
def dirname(self):
os.path.dirname(self)
def exists(self):
os.path.exists(self)
def join(self, *dirs):
os.path.join(self, *dirs)
def mkdir(self, name):
makes a directory in the root and returns its full path.

the path is split each non-existant directory is made. returns full path to new directory.

def normpath(self):
os.path.normpath(self)
def putfile(self, fname, contents, mode=None):
puts new filename relative to your TempIO root. Makes all directories along the path to the final file.

The fname argument can be a complete path, but must not start with a slash. Any missing directories will be created relative to the TempIO root

returns absolute filename.

def realpath(self):
os.path.realpath(self)
def splitext(self):
os.path.splitext(self)
def splitpath(self):
os.path.split(self)
API Documentation for fixture, generated by pydoctor.