def licensed

ezx@1.11.0.0 · src/pkg/pkg.bend:1187

import ezx@1.11.0.0/src/pkg/pkg.bend as Pkg
import Base
import ezx@1.11.0.0/src/pkg/path.bend as P

1187# the first found file whose place in the package lies under a directory
1188# named license, or "" when none does. It reads names alone, so nothing is
1189# weighed for it.
1190def licensed(+pre: String, fs: List<&2, Hit>) -> String:
1191  match fs:
1192    case []:
1193      ""
1194    case Hit{raw, _text} <> t:
1195      +at = P.join(pre, raw)
1196      licensed.step(license.under(at), at, _u => licensed(pre, t))

Uses (6)

Used by (1)