diff --git a/alist_sdk/path_lib.py b/alist_sdk/path_lib.py index 169a3bd..ace36c7 100644 --- a/alist_sdk/path_lib.py +++ b/alist_sdk/path_lib.py @@ -309,14 +309,14 @@ def read_bytes(self): """""" return self._client.get(self.as_download_uri()).content - def write_text(self, data: str): + def write_text(self, data: str, as_task=False): """""" - return self.write_bytes(data.encode()) + return self.write_bytes(data.encode(), as_task=as_task) - def write_bytes(self, data: bytes): + def write_bytes(self, data: bytes, as_task=False): """""" - _res = self._client.upload_file_put(data, self.as_posix(), False) + _res = self._client.upload_file_put(data, self.as_posix(), as_task=as_task) if _res.code == 200: return self.stat() return None diff --git a/alist_sdk/version.py b/alist_sdk/version.py index 0ec6478..dc319bf 100644 --- a/alist_sdk/version.py +++ b/alist_sdk/version.py @@ -1,3 +1,10 @@ -__version__ = "0.30.3" +""" + +0.30.4: + path_lib.AlistPath.write_* 支持as_task参数 + +""" + +__version__ = "0.30.4" ALIST_VERSION = "v3.30.0"