t.p.f._PathHelper : class documentation

Part of twisted.python.filepath View Source View In Hierarchy

Known subclasses: twisted.python.filepath.FilePath, twisted.python.zippath.ZipPath

Abstract helper class also used by ZipPath; implements certain utility methods.
Method getContent Undocumented
Method children List the chilren of this path object.
Method walk No summary
Method sibling Undocumented
Method segmentsFrom Return a list of segments between a child and its ancestor.
Method __hash__ Hash the same as another FilePath with the same path as mine.
Method getmtime Deprecated. Use getModificationTime instead.
Method getatime Deprecated. Use getAccessTime instead.
Method getctime Deprecated. Use getStatusChangeTime instead.
def getContent(self): (source)
def children(self): (source)
List the chilren of this path object.
Returnsan iterable of all currently-existing children of this object accessible with _PathHelper.child.
RaisesOSErrorIf an error occurs while listing the directory. If the error is 'serious', meaning that the operation failed due to an access violation, exhaustion of some kind of resource (file descriptors or memory), OSError or a platform-specific variant will be raised.
UnlistableErrorIf the inability to list the directory is due to this path not existing or not being a directory, the more specific OSError subclass UnlistableError is raised instead.
def walk(self, descend=None): (source)
Yield myself, then each of my children, and each of those children's children in turn. The optional argument descend is a predicate that takes a FilePath, and determines whether or not that FilePath is traversed/descended into. It will be called with each path for which isdir returns True. If descend is not specified, all directories will be traversed (including symbolic links which refer to directories).
ParametersdescendA one-argument callable that will return True for FilePaths that should be traversed, False otherwise.
Returnsa generator yielding FilePath-like objects.
def sibling(self, path): (source)
def segmentsFrom(self, ancestor): (source)

Return a list of segments between a child and its ancestor.

For example, in the case of a path X representing /a/b/c/d and a path Y representing /a/b, Y.segmentsFrom(X) will return ['c', 'd'].
Parametersancestoran instance of the same class as self, ostensibly an ancestor of self.
Returnsa list of strs
RaisesValueError if the 'ancestor' parameter is not actually an ancestor, i.e. a path for /x/y/z is passed as an ancestor for /a/b/c/d.
def __hash__(self): (source)
Hash the same as another FilePath with the same path as mine.
def getmtime(self): (source)
Deprecated. Use getModificationTime instead.
def getatime(self): (source)
Deprecated. Use getAccessTime instead.
def getctime(self): (source)
Deprecated. Use getStatusChangeTime instead.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:02:37.