MCPcopy Create free account
hub / github.com/vastsa/FileCodeBox / file_exists

Method file_exists

core/storage.py:1000–1010  ·  view source on GitHub ↗

检查文件是否存在于OpenDAL存储 :param save_path: 文件路径 :return: 文件是否存在

(self, save_path: str)

Source from the content-addressed store, hash-verified

998 logger.info(f"清理 OpenDAL 分片时出错: {e}")
999
1000 async def file_exists(self, save_path: str) -> bool:
1001 """
1002 检查文件是否存在于OpenDAL存储
1003 :param save_path: 文件路径
1004 :return: 文件是否存在
1005 """
1006 try:
1007 await self.operator.stat(save_path)
1008 return True
1009 except Exception:
1010 return False
1011
1012
1013class WebDAVFileStorage(FileStorageInterface):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected