![]() |
Protocol for read-only methods of pathlib.Path-like API.
Inherits From: PurePath
, Protocol
tfds.core.ReadOnlyPath(
*args, **kwargs
)
See pathlib.Path documentation.
Attributes | |
---|---|
parent
|
|
parents
|
Methods
as_posix
as_posix() -> str
as_uri
as_uri() -> str
exists
@abc.abstractmethod
exists() -> bool
Returns True if self exists.
expanduser
expanduser() -> tfds.typing.T
Returns a new path with expanded ~
and ~user
constructs.
glob
@abc.abstractmethod
glob( pattern: str ) -> Iterator[T]
Yielding all matching files (of any kind).
is_absolute
is_absolute() -> bool
is_dir
@abc.abstractmethod
is_dir() -> bool
Returns True if self is a dir.
is_file
is_file() -> bool
Returns True if self is a file.
is_relative_to
is_relative_to(
*other
) -> bool
Return True if the path is relative to another path or False.
is_reserved
is_reserved() -> bool
iterdir
@abc.abstractmethod
iterdir() -> Iterator[T]
Iterates over the directory.
joinpath
joinpath(
*other
) -> tfds.typing.T
match
match(
path_pattern: str
) -> bool
open
@abc.abstractmethod
open( mode: str = 'r', encoding: Optional[str] = None, errors: Optional[str] = None, **kwargs ) -> typing.IO[AnyStr]
Opens the file.
read_bytes
read_bytes() -> bytes
Reads contents of self as bytes.
read_text
read_text(
encoding: Optional[str] = None
) -> str
Reads contents of self as bytes.
relative_to
relative_to(
*other
) -> tfds.typing.T
resolve
@abc.abstractmethod
resolve( strict: bool = False ) ->
tfds.typing.T
Returns the absolute path.
rglob
rglob(
pattern: str
) -> Iterator[T]
Yielding all matching files recursivelly (of any kind).
with_name
with_name(
name: str
) -> tfds.typing.T
with_suffix
with_suffix(
suffix: str
) -> tfds.typing.T
__ge__
__ge__(
other: "PurePath"
) -> bool
Return self>=value.
__gt__
__gt__(
other: "PurePath"
) -> bool
Return self>value.
__le__
__le__(
other: "PurePath"
) -> bool
Return self<=value.
__lt__
__lt__(
other: "PurePath"
) -> bool
Return self<value.
__rtruediv__
__rtruediv__(
key: tfds.core.PathLike
) -> tfds.typing.T
__truediv__
__truediv__(
key: tfds.core.PathLike
) -> tfds.typing.T