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

Method Copy

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

Source from the content-addressed store, hash-verified

150}
151
152func (sd *ScriptDrive) Copy(ctx types.TaskCtx, from types.IEntry, to string, override bool) (types.IEntry, error) {
153 vm, e := sd.pool.Get(ctx)
154 if e != nil {
155 return nil, e
156 }
157 defer func() { _ = sd.pool.Return(context.Background(), vm) }()
158 v, e := sd.call(ctx, vm, "copy", s.NewTaskCtx(vm, ctx), s.NewEntry(from), to, override)
159 if e != nil {
160 return nil, e
161 }
162 return sd.valueToEntry(v), nil
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)

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