File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88from collections .abc import Sequence
99from typing import TYPE_CHECKING
1010
11+ from upath .core import UnsupportedOperation
1112from upath .core import UPath
1213from upath .types import JoinablePathLike
1314
@@ -56,3 +57,29 @@ def parts(self) -> Sequence[str]:
5657 return parts [1 :]
5758 else :
5859 return parts
60+
61+ def touch (self , mode : int = 0o666 , exist_ok : bool = True ) -> None :
62+ raise UnsupportedOperation
63+
64+ def mkdir (
65+ self ,
66+ mode : int = 0o777 ,
67+ parents : bool = False ,
68+ exist_ok : bool = False ,
69+ ) -> None :
70+ raise UnsupportedOperation
71+
72+ def unlink (self , missing_ok : bool = False ) -> None :
73+ raise UnsupportedOperation
74+
75+ def write_bytes (self , data : bytes ) -> int :
76+ raise UnsupportedOperation
77+
78+ def write_text (
79+ self ,
80+ data : str ,
81+ encoding : str | None = None ,
82+ errors : str | None = None ,
83+ newline : str | None = None ,
84+ ) -> int :
85+ raise UnsupportedOperation ("GitHubPath does not support writing" )
You can’t perform that action at this time.
0 commit comments