MCPcopy
hub / github.com/AlistGo/alist / Remove

Method Remove

drivers/crypt/driver.go:359–365  ·  view source on GitHub ↗
(ctx context.Context, obj model.Obj)

Source from the content-addressed store, hash-verified

357}
358
359func (d *Crypt) Remove(ctx context.Context, obj model.Obj) error {
360 remoteActualPath, err := d.getActualPathForRemote(obj.GetPath(), obj.IsDir())
361 if err != nil {
362 return fmt.Errorf("failed to convert path to remote path: %w", err)
363 }
364 return op.Remove(ctx, d.remoteStorage, remoteActualPath)
365}
366
367func (d *Crypt) Put(ctx context.Context, dstDir model.Obj, streamer model.FileStreamer, up driver.UpdateProgress) error {
368 dstDirActualPath, err := d.getActualPathForRemote(dstDir.GetPath(), true)

Callers

nothing calls this directly

Calls 4

RemoveFunction · 0.92
GetPathMethod · 0.65
IsDirMethod · 0.65

Tested by

no test coverage detected