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

Method Enqueue

common/sync/merger/tree-node.go:171–179  ·  view source on GitHub ↗

Enqueue recursively appends al tree.N and the children's tree.N to a slice

(nodes []tree.N)

Source from the content-addressed store, hash-verified

169
170// Enqueue recursively appends al tree.N and the children's tree.N to a slice
171func (t *TreeNode) Enqueue(nodes []tree.N) []tree.N {
172 nodes = append(nodes, t.N)
173 if !t.IsLeaf() {
174 for _, c := range t.SortedChildren() {
175 nodes = c.Enqueue(nodes)
176 }
177 }
178 return nodes
179}
180
181// SortedChildren sorts children by their labels. An internal flag avoids resorting if
182// it was already sorted once.

Callers

nothing calls this directly

Calls 3

SortedChildrenMethod · 0.95
IsLeafMethod · 0.65
EnqueueMethod · 0.65

Tested by

no test coverage detected