Tree.

traversePath(tree, path)

This traverses a map-based tree using the slash-separated keys in the string path. Keys before the last key will follow the trailing slash convention.

Example: Given the path “posts/2026/hello.html”, this traverses the tree using the keys “posts/”, “2026/”, and “hello.html”, then returns the resulting value.