<br />

Abstract base class for pathlib.Path-like API.

    tfds.core.Path(
        *args
    ) -> Self

See [pathlib.Path](https://docs.python.org/3/library/pathlib.html)
documentation.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `*args` | Paths to create |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `anchor` | The concatenation of the drive and root, or ''. |
| `drive` | The drive prefix (letter or UNC path), if any. |
| `name` | The final path component, if any. |
| `parent` | The logical parent of the path. |
| `parents` | A sequence of this path's logical parents. |
| `parts` | An object providing sequence-like access to the components in the filesystem path. |
| `root` | The root of the path, if any. |
| `stem` | The final path component, minus its last suffix. |
| `suffix` | The final component's last suffix, if any. <br /> This includes the leading period. For example: '.txt' |
| `suffixes` | A list of the final component's suffixes, if any. <br /> These include the leading periods. For example: \['.tar', '.gz'\] |

<br />

## Methods

### `absolute`

    absolute() -> Self

Returns the absolute path.

### `as_posix`

    as_posix()

Return the string representation of the path with forward (/)
slashes.

### `as_uri`

    as_uri()

Return the path as a 'file' URI.

### `copy`

    copy(
        dst: PathLike, overwrite: bool = False
    ) -> Self

Copy the current file to the given destination.

### `exists`

    exists() -> bool

Returns True if self exists.

### `expanduser`

    expanduser() -> Self

Returns a new path with expanded `~` and `~user` constructs.

### `format`

    format(
        *args, **kwargs
    ) -> Self

Apply `str.format()` to the path.

### `glob`

    glob(
        pattern: str
    ) -> Iterator[Self]

Yields all matching files (of any kind).

### `is_absolute`

    is_absolute()

True if the path is absolute (has both a root and, if applicable, a drive).

### `is_dir`

    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
    )

Return True if the path is relative to another path or False.

### `is_reserved`

    is_reserved()

Return True if the path contains one of the special names reserved by the system, if any.

### `iterdir`

    iterdir() -> Iterator[Self]

Iterates over the directory.

### `joinpath`

    joinpath(
        *args
    )

Combine this path with one or several arguments, and return a new path representing either a subpath (if all arguments are relative paths) or a totally different path (if one of the arguments is anchored).

### `listdir`

    listdir() -> list[Self]

Lists files/folders in a directory.

Colab usage only!

This is not in the official `pathlib.Path` API, but on Colab,
using `list(path.iterdir())` is such a common pattern that it's convenient
to have it.

### `match`

    match(
        path_pattern
    )

Return True if this path matches the given pattern.

### `mkdir`

    mkdir(
        mode: Optional[int] = None, parents: bool = False, exist_ok: bool = False
    ) -> None

Create a new directory at this given path.

### `open`

    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 a string.

### `relative_to`

    relative_to(
        *other
    )

Return the relative path to another path identified by the passed arguments.
If the operation is not possible (because this is not
a subpath of the other path), raise ValueError.

### `rename`

    rename(
        target: PathLike
    ) -> Self

Renames the path.

### `replace`

    replace(
        target: PathLike
    ) -> Self

Overwrites the destination path.

### `resolve`

    resolve(
        strict: bool = False
    ) -> Self

Returns the absolute path.

### `rglob`

    rglob(
        pattern: str
    ) -> Iterator[Self]

Yields all matching files recursively (of any kind).

### `rmdir`

    rmdir() -> None

Remove the empty directory at this given path.

### `rmtree`

    rmtree(
        missing_ok: bool = False
    ) -> None

Remove the directory, including all sub-files.

### `stat`

    stat() -> stat_utils.StatResult

Returns metadata for the file/directory.

### `touch`

    touch(
        mode: int = 438, exist_ok: bool = True
    ) -> None

Create a file at this given path.

### `unlink`

    unlink(
        missing_ok: bool = False
    ) -> None

Remove this file or symbolic link.

### `walk`

    walk(
        *,
        top_down: bool = True,
        on_error: (Callable[[OSError], object] | None) = None
    ) -> Iterator[tuple[Self, list[str], list[str]]]

### `with_name`

    with_name(
        name
    )

Return a new path with the file name changed.

### `with_stem`

    with_stem(
        stem
    )

Return a new path with the stem changed.

### `with_suffix`

    with_suffix(
        suffix
    )

Return a new path with the file suffix changed.
If the path
has no suffix, add given suffix. If the given suffix is an empty
string, remove the suffix from the path.

### `write_bytes`

    write_bytes(
        data: bytes
    ) -> int

Writes content as bytes.

### `write_text`

    write_text(
        data: str, encoding: Optional[str] = None, errors: Optional[str] = None
    ) -> int

Writes content as str.

### `__eq__`

    __eq__(
        other
    )

Return self==value.

### `__ge__`

    __ge__(
        other
    )

Return self\>=value.

### `__gt__`

    __gt__(
        other
    )

Return self\>value.

### `__le__`

    __le__(
        other
    )

Return self\<=value.

### `__lt__`

    __lt__(
        other
    )

Return self\<value.

### `__rtruediv__`

    __rtruediv__(
        key
    )

### `__truediv__`

    __truediv__(
        key
    )