// GetChild returns child by path if exists. Path looks like "grandparent.parent.child.grandchild"
347441
func (n *Node) GetChild(path string) *Node {
	result := n
	names := strings.Split(path, ".")
	for _, name := range names {
		children, exists := result.Children[name]
		if !exists {
			return nil
		}
		if len(children) == 0 {
			return nil
		}
		result = children[0]
	}
	return result
}
107347
func (c *CheckRunAnnotation) GetPath() string {
	if c == nil || c.Path == nil {
		return ""
	}
	return *c.Path
}
430560
func (req *Request) GetPath() (path string) {
	path, _ = req.GetValue(ENGINE_PATH).(string)
	return
}
289088
func RemoveChild(o *js.Object, co ...*js.Object) {
	for _, onode := range co {
		o.Get("parentNode").Call("removeChild", onode)
	}
}
516925
func (p Path) GetNode(ctx context.Context, config libkbfs.Config) (libkbfs.Node, data.EntryInfo, error) {
	if p.PathType != TLFPathType {
		entryInfo := data.EntryInfo{
			Type: data.Dir,
		}
		return nil, entryInfo, nil
	}

	tlfHandle, err := ParseTlfHandle(
		ctx, config.KBPKI(), config.MDOps(), config, p.TLFName, p.TLFType)
	if err != nil {
		return nil, data.EntryInfo{}, err
	}

	node, entryInfo, err := config.KBFSOps().GetOrCreateRootNode(ctx, tlfHandle, data.MasterBranch)
	if err != nil {
		return nil, data.EntryInfo{}, err
	}

	for _, component := range p.TLFComponents {
		lookupNode, lookupEntryInfo, lookupErr := config.KBFSOps().Lookup(ctx, node, component)
		if lookupErr != nil {
			return nil, data.EntryInfo{}, lookupErr
		}
		node = lookupNode
		entryInfo = lookupEntryInfo
	}

	return node, entryInfo, nil
}
1345477
func (d *DraftReviewComment) GetPath() string {
	if d == nil || d.Path == nil {
		return ""
	}
	return *d.Path
}
863405
func (j *Json) GetPath(branch ...string) *Json {
	jin := j
	for _, p := range branch {
		jin = jin.Get(p)
	}
	return jin
}
283870
func getChildDevice(d *device, deviceType string) *device {
	for i := range d.DeviceList.Device {
		if d.DeviceList.Device[i].DeviceType == deviceType {
			return &d.DeviceList.Device[i]
		}
	}
	return nil
}
313452
func (n *TreeNode) AddChild(node *TreeNode) *TreeNode {
	n.children = append(n.children, node)
	return n
}
399073
func (l *Logger) Child(name string) *Logger {
	return l.children.getOrAdd(name, l)
}
1091645
func (n *node) get(key Item) Item {
	i, found := n.items.find(key)
	if found {
		return n.items[i]
	} else if len(n.children) > 0 {
		return n.children[i].get(key)
	}
	return nil
}
1154095
func (ref Reference) Child(path string) *Reference {
	ref.path = _path.Join(ref.path, path)
	return &ref
}
154542
func (fb *Firebase) Child(child string) *Firebase {
	c := fb.copy()
	c.url = c.url + "/" + child
	return c
}
750008
func (n *XMLNode) AddChild(child *XMLNode) {
	child.parent = n
	if _, ok := n.Children[child.Name.Local]; !ok {
		n.Children[child.Name.Local] = []*XMLNode{}
	}
	n.Children[child.Name.Local] = append(n.Children[child.Name.Local], child)
}
381357
func (t *TrafficPath) GetPath() string {
	if t == nil || t.Path == nil {
		return ""
	}
	return *t.Path
}
90606
func (n *Node) GetChildByPath(subPath string) (*Node, error) {
	// Find the subnode if needed.
	parts := strings.Split(subPath, "/")

	currentNode := n
	for i := 0; i < len(parts); i++ {
		childPathName := parts[i]
		found := false
		for _, child := range currentNode.Children {
			if child.PathName == childPathName {
				found = true
				currentNode = child
				break
			}
		}
		if !found {
			return nil, fmt.Errorf("node %v has no children named %v", currentNode.Path, childPathName)
		}
	}
	return currentNode, nil
}
802138
func (cfp *FsPool) GetPath(fileIndex int64) string {
	path := filepath.FromSlash(cfp.container.Files[fileIndex].Path)
	fullPath := filepath.Join(cfp.basePath, path)
	return fullPath
}