File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010
1111from fsspec .asyn import sync
1212
13+ from upath import UnsupportedOperation
1314from upath ._stat import UPathStatResult
1415from upath .core import UPath
1516from upath .types import JoinablePathLike
@@ -124,3 +125,29 @@ def resolve(
124125 break
125126
126127 return resolved_path
128+
129+ def touch (self , mode : int = 0o666 , exist_ok : bool = True ) -> None :
130+ raise UnsupportedOperation
131+
132+ def mkdir (
133+ self ,
134+ mode : int = 0o777 ,
135+ parents : bool = False ,
136+ exist_ok : bool = False ,
137+ ) -> None :
138+ raise UnsupportedOperation
139+
140+ def unlink (self , missing_ok : bool = False ) -> None :
141+ raise UnsupportedOperation
142+
143+ def write_bytes (self , data : bytes ) -> int :
144+ raise UnsupportedOperation ("DataPath does not support writing" )
145+
146+ def write_text (
147+ self ,
148+ data : str ,
149+ encoding : str | None = None ,
150+ errors : str | None = None ,
151+ newline : str | None = None ,
152+ ) -> int :
153+ raise UnsupportedOperation ("DataPath does not support writing" )
You can’t perform that action at this time.
0 commit comments