class documentation

class ResourceHandle(Traversable): (source)

View In Hierarchy

Handle to a named resource in a ResourceReader.

Method __init__ Undocumented
Method is_dir Return True if self is a directory
Method is_file Return True if self is a file
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).
Instance Variable name The base name of this object without any parent references.
Instance Variable parent Undocumented

Inherited from Traversable:

Method __truediv__ Return Traversable child in self
Method iterdir Yield Traversable objects in self
Method read_bytes Read contents of self as bytes
Method read_text Read contents of self as text
def __init__(self, parent: ResourceContainer, name: str): (source)

Undocumented

def is_dir(self): (source)

Return True if self is a directory

def is_file(self): (source)

Return True if self is a file

def joinpath(self, name): (source)

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`` (``/``).

def open(self, mode='r', *args, **kwargs): (source)

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.

The base name of this object without any parent references.

Undocumented