Path returns the path to this node from the tree root, using [Node.Name]s separated by / delimeters. Any existing / characters in names are escaped to \\
()
| 232 | // using [Node.Name]s separated by / delimeters. Any |
| 233 | // existing / characters in names are escaped to \\ |
| 234 | func (n *NodeBase) Path() string { |
| 235 | if n.Parent != nil { |
| 236 | return n.Parent.AsTree().Path() + "/" + EscapePathName(n.Name) |
| 237 | } |
| 238 | return "/" + EscapePathName(n.Name) |
| 239 | } |
| 240 | |
| 241 | // PathFrom returns the path to this node from the given parent node, |
| 242 | // using [Node.Name]s separated by / delimeters. Any |