MCPcopy Index your code
hub / github.com/vastsa/FileCodeBox / _file_exists

Method _file_exists

core/storage.py:842–851  ·  view source on GitHub ↗

同步检查文件是否存在

(self, save_path: str)

Source from the content-addressed store, hash-verified

840 logger.info(f"清理 OneDrive 分片时出错: {e}")
841
842 def _file_exists(self, save_path: str) -> bool:
843 """同步检查文件是否存在"""
844 try:
845 path = self._get_path_str(save_path)
846 self.root_path.get_by_path(path).get().execute_query()
847 return True
848 except self._ClientRequestException as e:
849 if e.code == "itemNotFound":
850 return False
851 raise e
852
853 async def file_exists(self, save_path: str) -> bool:
854 """

Callers

nothing calls this directly

Calls 1

_get_path_strMethod · 0.95

Tested by

no test coverage detected