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

Method delete_file

apps/admin/services.py:91–101  ·  view source on GitHub ↗
(self, file_id: int)

Source from the content-addressed store, hash-verified

89 await file_code.delete()
90
91 async def delete_file(self, file_id: int):
92 file_code = await FileCodes.get(id=file_id)
93 target_name = self._build_file_activity_name(file_code)
94 await self._delete_file_code(file_code)
95 await self.record_admin_activity(
96 action="file.delete",
97 target_type="file",
98 target_id=file_id,
99 target_name=target_name,
100 count=1,
101 )
102
103 async def delete_files(self, file_ids: list[int]):
104 unique_ids = list(dict.fromkeys(file_ids))

Callers 4

presign_upload_cancelFunction · 0.45
_delete_file_codeMethod · 0.45
file_deleteFunction · 0.45
delete_local_fileFunction · 0.45

Calls 3

_delete_file_codeMethod · 0.95
record_admin_activityMethod · 0.95

Tested by

no test coverage detected