同步检查文件是否存在
(self, save_path: str)
| 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 | """ |
nothing calls this directly
no test coverage detected