def dir_of
import bolt@1.27.0.0/src/rules/imports.bend as Importsimport Base
45# a path's directory, with its slash (`src/lsp/`; `` at the root)
46def dir_of(path: String) -> String:
47 +segs = init(String.split(norm(path), '/'))
48 Bool.pick(String, List.is_empty(&2, String, segs), "", String.join(segs, "/") ++ "/")