MCPcopy Create free account
hub / github.com/pydio/cells / CopyObject

Method CopyObject

common/nodes/core/handler-exec-struct.go:123–131  ·  view source on GitHub ↗
(ctx context.Context, from *tree.Node, to *tree.Node, requestData *models.CopyRequestData)

Source from the content-addressed store, hash-verified

121}
122
123func (f *StructStorageHandler) CopyObject(ctx context.Context, from *tree.Node, to *tree.Node, requestData *models.CopyRequestData) (models.ObjectInfo, error) {
124 i, e := f.Next.CopyObject(ctx, from, to, requestData)
125 if e == nil {
126 bi, _ := nodes.GetBranchInfo(ctx, "to")
127 c := nodes.WithBranchInfo(ctx, "in", bi)
128 f.publish(c, "to", tree.NodeChangeEvent_CREATE, to.Clone())
129 }
130 return i, e
131}
132
133func (f *StructStorageHandler) PutObject(ctx context.Context, node *tree.Node, reader io.Reader, requestData *models.PutRequestData) (models.ObjectInfo, error) {
134 i, e := f.Next.PutObject(ctx, node, reader, requestData)

Callers

nothing calls this directly

Calls 5

publishMethod · 0.95
GetBranchInfoFunction · 0.92
WithBranchInfoFunction · 0.92
CopyObjectMethod · 0.65
CloneMethod · 0.65

Tested by

no test coverage detected