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

Part of View In Hierarchy

Known subclasses:

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):
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):
def abspath(self):
def basename(self):
def dirname(self):
def 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):
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):
def splitext(self):
def splitpath(self):
API Documentation for fixture, generated by pydoctor.