MCPcopy Create free account
hub / github.com/devld/go-drive / deleteEntry

Method deleteEntry

server/api_drive.go:250–262  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

248}
249
250func (dr *driveRoute) deleteEntry(c *gin.Context) {
251 path := utils.CleanPath(c.Param("path"))
252 d := c.MustGet("drive").(types.IDrive)
253
254 t, e := dr.runner.ExecuteAndWait(func(ctx types.TaskCtx) (any, error) {
255 return nil, d.Delete(ctx, path)
256 }, 2*time.Second, task.WithNameGroup(path, "drive/delete"))
257 if e != nil {
258 _ = c.Error(e)
259 return
260 }
261 SetResult(c, t)
262}
263
264func (dr *driveRoute) upload(c *gin.Context) {
265 path := utils.CleanPath(c.Param("path"))

Callers

nothing calls this directly

Calls 6

CleanPathFunction · 0.92
WithNameGroupFunction · 0.92
SetResultFunction · 0.85
ExecuteAndWaitMethod · 0.65
DeleteMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected