Skip to content

Commit b901f65

Browse files
committed
path_lib.AlistPath.write_* 支持as_task参数
1 parent 766c6c6 commit b901f65

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

alist_sdk/path_lib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,14 +309,14 @@ def read_bytes(self):
309309
""""""
310310
return self._client.get(self.as_download_uri()).content
311311

312-
def write_text(self, data: str):
312+
def write_text(self, data: str, as_task=False):
313313
""""""
314-
return self.write_bytes(data.encode())
314+
return self.write_bytes(data.encode(), as_task=as_task)
315315

316-
def write_bytes(self, data: bytes):
316+
def write_bytes(self, data: bytes, as_task=False):
317317
""""""
318318

319-
_res = self._client.upload_file_put(data, self.as_posix(), False)
319+
_res = self._client.upload_file_put(data, self.as_posix(), as_task=as_task)
320320
if _res.code == 200:
321321
return self.stat()
322322
return None

alist_sdk/version.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1-
__version__ = "0.30.3"
1+
"""
2+
3+
0.30.4:
4+
path_lib.AlistPath.write_* 支持as_task参数
5+
6+
"""
7+
8+
__version__ = "0.30.4"
29

310
ALIST_VERSION = "v3.30.0"

0 commit comments

Comments
 (0)