def dir_of

bolt@1.27.0.0 · src/rules/imports.bend:45

import bolt@1.27.0.0/src/rules/imports.bend as Imports
import 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, "/") ++ "/")

Uses (9)

Used by (4)