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

Method file_exists

core/storage.py:1318–1327  ·  view source on GitHub ↗

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

(self, save_path: str)

Source from the content-addressed store, hash-verified

1316 logger.info(f"清理 WebDAV 分片时出错: {e}")
1317
1318 async def file_exists(self, save_path: str) -> bool:
1319 """
1320 检查文件是否存在于WebDAV
1321 :param save_path: 文件路径
1322 :return: 文件是否存在
1323 """
1324 url = self._build_url(save_path)
1325 async with aiohttp.ClientSession(auth=self.auth) as session:
1326 async with session.head(url) as resp:
1327 return resp.status == 200
1328
1329
1330storages = {

Callers

nothing calls this directly

Calls 1

_build_urlMethod · 0.95

Tested by

no test coverage detected