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

Method _save

core/storage.py:627–631  ·  view source on GitHub ↗
(self, file, save_path)

Source from the content-addressed store, hash-verified

625 return "/".join(path)
626
627 def _save(self, file, save_path):
628 content = file.file.read()
629 name = save_path(file.filename)
630 path = self._get_path_str(save_path)
631 self.root_path.get_by_path(path).upload(name, content).execute_query()
632
633 async def save_file(self, file: UploadFile, save_path: str):
634 await asyncio.to_thread(self._save, file, save_path)

Callers

nothing calls this directly

Calls 2

_get_path_strMethod · 0.95
readMethod · 0.80

Tested by

no test coverage detected