检查文件是否存在于WebDAV :param save_path: 文件路径 :return: 文件是否存在
(self, save_path: str)
| 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 | |
| 1330 | storages = { |
nothing calls this directly
no test coverage detected