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

Function delete_local_file

apps/admin/views.py:529–542  ·  view source on GitHub ↗
(
    item: DeleteItem,
    local_file_service: LocalFileService = Depends(get_local_file_service),
    file_service: FileService = Depends(get_file_service),
)

Source from the content-addressed store, hash-verified

527
528@admin_api.delete("/local/delete")
529async def delete_local_file(
530 item: DeleteItem,
531 local_file_service: LocalFileService = Depends(get_local_file_service),
532 file_service: FileService = Depends(get_file_service),
533):
534 result = await local_file_service.delete_file(item.filename)
535 await file_service.record_admin_activity(
536 action="local_file.delete",
537 target_type="local_file",
538 target_name=item.filename,
539 count=1,
540 meta={"success": bool(result)},
541 )
542 return APIResponse(detail=result)
543
544
545@admin_api.post("/local/share")

Callers

nothing calls this directly

Calls 3

APIResponseClass · 0.90
record_admin_activityMethod · 0.80
delete_fileMethod · 0.45

Tested by

no test coverage detected