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

Method delete_file

apps/admin/services.py:1578–1583  ·  view source on GitHub ↗
(self, filename: str)

Source from the content-addressed store, hash-verified

1576 return files
1577
1578 async def delete_file(self, filename: str):
1579 file = LocalFileClass(filename)
1580 if await file.exists():
1581 await file.delete()
1582 return "删除成功"
1583 raise HTTPException(status_code=404, detail="文件不存在")
1584
1585
1586class LocalFileClass:

Callers

nothing calls this directly

Calls 3

existsMethod · 0.95
deleteMethod · 0.95
LocalFileClassClass · 0.85

Tested by

no test coverage detected