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

Method clean_chunks

core/storage.py:991–998  ·  view source on GitHub ↗

清理 OpenDAL 存储上的临时分片文件

(self, upload_id: str, save_path: str)

Source from the content-addressed store, hash-verified

989 return save_path, file_sha256.hexdigest()
990
991 async def clean_chunks(self, upload_id: str, save_path: str):
992 """清理 OpenDAL 存储上的临时分片文件"""
993 chunk_dir = str(Path(save_path).parent / "chunks" / upload_id)
994 try:
995 # OpenDAL 支持递归删除
996 await self.operator.remove_all(chunk_dir)
997 except Exception as e:
998 logger.info(f"清理 OpenDAL 分片时出错: {e}")
999
1000 async def file_exists(self, save_path: str) -> bool:
1001 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected