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

Method Move

drive/script/index.go:165–176  ·  view source on GitHub ↗
(ctx types.TaskCtx, from types.IEntry, to string, override bool)

Source from the content-addressed store, hash-verified

163}
164
165func (sd *ScriptDrive) Move(ctx types.TaskCtx, from types.IEntry, to string, override bool) (types.IEntry, error) {
166 vm, e := sd.pool.Get(ctx)
167 if e != nil {
168 return nil, e
169 }
170 defer func() { _ = sd.pool.Return(context.Background(), vm) }()
171 v, e := sd.call(ctx, vm, "move", s.NewTaskCtx(vm, ctx), s.NewEntry(from), to, override)
172 if e != nil {
173 return nil, e
174 }
175 return sd.valueToEntry(v), nil
176}
177
178func (sd *ScriptDrive) List(ctx context.Context, path string) ([]types.IEntry, error) {
179 vm, e := sd.pool.Get(ctx)

Callers

nothing calls this directly

Calls 4

callMethod · 0.95
valueToEntryMethod · 0.95
ReturnMethod · 0.80
GetMethod · 0.65

Tested by

no test coverage detected