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

Method save_chunk

core/storage.py:753–756  ·  view source on GitHub ↗

保存分片到 OneDrive

(self, upload_id: str, chunk_index: int, chunk_data: bytes, chunk_hash: str, save_path: str)

Source from the content-addressed store, hash-verified

751 current_folder.upload(filename, chunk_data).execute_query()
752
753 async def save_chunk(self, upload_id: str, chunk_index: int, chunk_data: bytes, chunk_hash: str, save_path: str):
754 """保存分片到 OneDrive"""
755 chunk_path = str(Path(save_path).parent / "chunks" / upload_id / f"{chunk_index}.part")
756 await asyncio.to_thread(self._save_chunk, chunk_path, chunk_data)
757
758 def _read_chunk(self, chunk_path: str) -> bytes:
759 """同步读取分片"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected