def tree.top
import ezx@1.11.0.0/src/sha/nar.bend as Narimport Base
441# the node of the whole tree, from its listing with the top first: a
442# directory is built, a file or a symlink is a leaf
443def tree.top(is_dir: Bool, top: Ent, more: List<&2, Ent>) -> Maybe<&2, String>:
444 match is_dir:
445 case True{}:
446 build(more)
447 case False{}:
448 Some{leaf(top)}