Imports.dir_of: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/imports.bend as Imports Lines 45-48 of bolt@1.27.0.0/src/rules/imports.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/imports.bend&start_line=45&end_line=48 import Base # a path's directory, with its slash (`src/lsp/`; `` at the root) def dir_of(path: String) -> String: +segs = init(String.split(norm(path), '/')) Bool.pick(String, List.is_empty(&2, String, segs), "", String.join(segs, "/") ++ "/") Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.is_empty https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.join https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.split https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/imports.bend&name=init https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/imports.bend&name=norm