def dir.of

ezx@1.11.0.0 · src/tool/plan.bend:309

import ezx@1.11.0.0/src/tool/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/tool/world.bend as TW
import ezx@1.11.0.0/src/ez/target.bend as Tgt

309# the cache directory of a target: `<root>/<slug>` for a remote, and
310# `<root>/local<abs>` for a path
311def dir.of(pl: Tgt.Place, +root: String, +world: TW.World) -> String:
312  match pl:
313    case Tgt.Bad{_why}:
314      root
315    case Tgt.Local{p}:
316      root ++ "/local" ++ loc.abs(loc(p, world))
317    case Tgt.Remote{_url, slug}:
318      root ++ "/" ++ slug

Uses (6)

Used by (1)