bolt/lsp/path.bend checks
raw source on the hub · import 0x729eecea86ea5a2cdba3a2856a313bca/bolt/lsp/path.bend as Path
lsp/path: just enough path arithmetic to follow a relative import.
1 import
import Base
Definitions
def push source · line 5 · raw
@+seg:String -> @+acc:List<&2, String> -> List<&2, String>
a segment lands on the stack (reversed): .. pops, . and `` do nothing
def norm source · line 10 · raw
@segs:List<&2, String> -> @acc:List<&2, String> -> List<&2, String>
every segment pushed, in order
def join source · line 18 · raw
@dir:String -> @rel:String -> String
dir and rel as one absolute path, its . and .. resolved
def dir source · line 22 · raw
@path:String -> String
the directory of a file's path