func (e *Editor) InsertNodeAtPath(ctx context.Context, pth string, toinsert dms3ld.Node, create func() *dag.ProtoNode) error {
	splpath := path.SplitList(pth)
	nd, err := e.insertNodeAtPath(ctx, e.root, splpath, toinsert, create)
	if err != nil {
		return err
	}
	e.root = nd
	return nil
}
// InsertNodeAtPath inserts a new node in the tree and replaces the current root with the new one.
InsertNodeAtPath inserts a new node in the tree and replaces the current root with the new one.
// InsertNodeAtPath inserts a new node in the tree and replaces the current root with the new one .
func (e *Editor) InsertNodeAtPath(ctx context.Context, pth string, toinsert dms3ld.Node, create func() *dag.ProtoNode) error {
	splpath := path.SplitList(pth)
	nd, err := e.insertNodeAtPath(ctx, e.root, splpath, toinsert, create)
	if err != nil {
		return err
	}
	e.root = nd
	return nil
}
func ( e * Editor ) InsertNodeAtPath ( ctx context . Context , pth string , toinsert dms3ld . Node , create func ( ) * dag . ProtoNode ) error { splpath := path . SplitList ( pth ) nd , err := e . insertNodeAtPath ( ctx , e . root , splpath , toinsert , create ) if err != nil { return err } e . root = nd return nil }
InsertNodeAtPath inserts a new node in the tree and replaces the current root with the new one.
InsertNodeAtPath inserts a new node in the tree and replaces the current root with the new one .