def seg.ok
import ezx@1.11.0.0/src/ws/workspace.bend as Workspaceimport Base
92# whether a segment can be part of a member's path: it is not empty, which a
93# leading `/` or a `//` would make it, it is neither `.` nor `..`, which
94# would name a directory by where it is from here, and it is not `*`, which
95# only ends an entry
96def seg.ok(+seg: String) -> Bool:
97 Bool.and(Bool.not(String.is_empty(seg)),
98 Bool.and(Bool.not(String.eq(seg, ".")),
99 Bool.and(Bool.not(String.eq(seg, "..")), Bool.not(String.eq(seg, "*")))))