Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions upath/implementations/tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from typing import TYPE_CHECKING

from upath._stat import UPathStatResult
from upath.core import UnsupportedOperation
from upath.core import UPath
from upath.types import JoinablePathLike
from upath.types import StatResultType
Expand Down Expand Up @@ -41,6 +42,32 @@ def __init__(
**storage_options: Unpack[TarStorageOptions],
) -> None: ...

def touch(self, mode: int = 0o666, exist_ok: bool = True) -> None:
raise UnsupportedOperation

def mkdir(
self,
mode: int = 0o777,
parents: bool = False,
exist_ok: bool = False,
) -> None:
raise UnsupportedOperation

def unlink(self, missing_ok: bool = False) -> None:
raise UnsupportedOperation

def write_bytes(self, data: bytes) -> int:
raise UnsupportedOperation("DataPath does not support writing")

def write_text(
self,
data: str,
encoding: str | None = None,
errors: str | None = None,
newline: str | None = None,
) -> int:
raise UnsupportedOperation("DataPath does not support writing")

def stat(
self,
*,
Expand Down
Loading