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:
@@ -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):
|
||||
|
Reference in New Issue
Block a user