Class t.p.f._PathHelper:

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 Undocumented
Method walk Yield myself, then each of my children, and each of those children's
Method sibling Undocumented
Method segmentsFrom Return a list of segments between a child and its ancestor.
def getContent(self): (source)
Undocumented
def children(self): (source)
Undocumented
def walk(self): (source)
Yield myself, then each of my children, and each of those children's children in turn.
Returnsa generator yielding FilePath-like objects.
def sibling(self, path): (source)
Undocumented
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.
API Documentation for twisted, generated by pydoctor.