class documentation

An object with a subset of pathlib.Path methods suitable for traversing directories and opening files. Any exceptions that occur when accessing the backing resource may propagate unaltered.

Method __truediv__ Return Traversable child in self
Method is_dir Return True if self is a directory
Method is_file 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).
Method read_bytes Read contents of self as bytes
Method read_text Read contents of self as text
Property name The base name of this object without any parent references.
def __truediv__(self, child: StrPath) -> Traversable: (source)

Return Traversable child in self

def read_bytes(self) -> bytes: (source)

Read contents of self as bytes

def read_text(self, encoding: Optional[str] = None) -> str: (source)

Read contents of self as text