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

Function newTreeDiff

common/sync/merger/tree-diff.go:71–85  ·  view source on GitHub ↗

newTreeDiff instantiates a new TreeDiff - If left is a MetadataProvider and right a MetadataReceiver, it will set up metadata diff management

(left model.PathSyncSource, right model.PathSyncSource)

Source from the content-addressed store, hash-verified

69// newTreeDiff instantiates a new TreeDiff - If left is a MetadataProvider and right a MetadataReceiver,
70// it will set up metadata diff management
71func newTreeDiff(left model.PathSyncSource, right model.PathSyncSource) *TreeDiff {
72 t := &TreeDiff{
73 //ctx: ctx,
74 left: left,
75 right: right,
76 }
77 mp, leftOk := left.(model.MetadataProvider)
78 _, rightOk := right.(model.MetadataReceiver)
79 if leftOk && rightOk {
80 if globs, o := mp.ProvidesMetadataNamespaces(); o {
81 t.includeMetas = globs
82 }
83 }
84 return t
85}
86
87// Compute performs the actual diff between left and right
88func (diff *TreeDiff) Compute(ctx context.Context, root string, lock chan bool, rootStats map[string]*model.EndpointRootStat, ignores ...glob.Glob) error {

Callers 8

diffFromSnapsFunction · 0.85
NewDiffFunction · 0.85
NewTreeDiffFunction · 0.85
TestComputeSourcesDiffFunction · 0.85
TestTreeDiffFunction · 0.85
TestTreeDiffErrorsFunction · 0.85

Calls 1

Tested by 6

diffFromSnapsFunction · 0.68
TestComputeSourcesDiffFunction · 0.68
TestTreeDiffFunction · 0.68
TestTreeDiffErrorsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…