class documentation
class SpecPath(abc.Traversable): (source)
Path tied to a module spec. Can be read and exposes the resource reader children.
Method | __init__ |
Undocumented |
Method | is |
Return True if self is a file |
Method | iterdir |
Yield Traversable objects in self |
Method | joinpath |
Return Traversable resolved with any descendants applied. |
Method | open |
mode may be 'r' or 'rb' to open as text or binary. Return a handle suitable for reading (same as pathlib.Path.open). |
Property | name |
The base name of this object without any parent references. |
Instance Variable | _reader |
Undocumented |
Instance Variable | _spec |
Undocumented |
Inherited from Traversable
:
Method | __truediv__ |
Return Traversable child in self |
Method | is |
Return True if self is a directory |
Method | read |
Read contents of self as bytes |
Method | read |
Read contents of self as text |
Return Traversable resolved with any descendants applied. Each descendant should be a path segment relative to self and each may contain multiple levels separated by ``posixpath.sep`` (``/``).
mode may be 'r' or 'rb' to open as text or binary. Return a handle suitable for reading (same as pathlib.Path.open). When opening as text, accepts encoding parameters such as those accepted by io.TextIOWrapper.