occurrenceByPathname method

HierarchyOccurrence? occurrenceByPathname(
  1. String pathname
)

Resolve a /-separated pathname to a HierarchyOccurrence.

Convenience that composes pathnameToAddress and occurrenceByAddress. Returns null when pathname does not match any occurrence in the tree.

Implementation

HierarchyOccurrence? occurrenceByPathname(String pathname) {
  final addr = pathnameToAddress(pathname);
  return addr == null ? null : occurrenceByAddress(addr);
}