src/paths.bend checks
raw source on the hub · import 0xde9bb08f7de298b03207fb5797ede9a5/src/paths.bend as Paths
src/paths: what a path names, read by its segments, never by a suffix or a
substring. A law file is one whose last segment is exactly LAWS.bend or
PROOF.bend, so OUTLAWS.bend is not one; a test is one with a directory
segment exactly tests, so contests/ is not one. Pure.
2 imports
import Base import ./lazy/lazy.bend as Lazy
Definitions
def base.go source · line 9 · raw
@segs:List<&2, String> -> @last:String -> String
the last of the segments, or the one before when there are none
def base source · line 17 · raw
@path:String -> String
a path's last segment
def tested source · line 21 · raw
@segs:List<&2, String> -> Bool
is some segment but the last exactly tests?
def is_test source · line 29 · raw
@path:String -> Bool
is the file under a tests directory?
def is_laws source · line 33 · raw
@path:String -> Bool
is it a LAWS.bend?
def is_proof source · line 37 · raw
@path:String -> Bool
is it a PROOF.bend?
def is_law_file source · line 41 · raw
@+path:String -> Bool
is it a LAWS.bend or a PROOF.bend?