chore: update opendal version (#14343)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
yihong
2025-03-11 20:44:09 +08:00
committed by GitHub
parent b817036343
commit c960b364c9
3 changed files with 4 additions and 11 deletions

View File

@@ -71,15 +71,8 @@ class OpenDALStorage(BaseStorage):
logger.debug(f"file {filename} downloaded to {target_filepath}")
def exists(self, filename: str) -> bool:
# FIXME this is a workaround for opendal python-binding do not have a exists method and no better
# error handler here when opendal python-binding has a exists method, we should use it
# more https://github.com/apache/opendal/blob/main/bindings/python/src/operator.rs
try:
res: bool = self.op.stat(path=filename).mode.is_file()
logger.debug(f"file {filename} checked")
return res
except Exception:
return False
res: bool = self.op.exists(path=filename)
return res
def delete(self, filename: str):
if self.exists(filename):