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

Method createNodeDeep

common/sync/merger/tree-node.go:295–309  ·  view source on GitHub ↗
(p string)

Source from the content-addressed store, hash-verified

293}
294
295func (t *TreeNode) createNodeDeep(p string) *TreeNode {
296 crtParent := t
297 split := strings.Split(p, "/")
298 for i := range split {
299 childPath := strings.Join(split[:i+1], "/")
300 if c, o := crtParent.children[childPath]; o {
301 crtParent = c
302 } else {
303 n := NewTreeNode(tree.LightNode(tree.NodeType_UNKNOWN, "", childPath, "", 0, 0, 0))
304 crtParent.AddChild(n)
305 crtParent = n
306 }
307 }
308 return crtParent
309}
310
311func (t *TreeNode) Walk(cb func(n *TreeNode) bool) {
312 if pruneBranch := cb(t); pruneBranch {

Callers 1

QueueOperationMethod · 0.80

Calls 4

LightNodeFunction · 0.92
AddChildMethod · 0.80
NewTreeNodeFunction · 0.70
JoinMethod · 0.45

Tested by

no test coverage detected