def is_stale

cswap-bend-cli@0.1.0.0 · dirlock.bend:49

import cswap-bend-cli@0.1.0.0/dirlock.bend as Dirlock
import Base
import cswap-bend-cli@0.1.0.0/act.bend as Act
import cswap-bend-cli@0.1.0.0/clock.bend as Clock

49def is_stale(+dir: String, +staleness: U32) -> Act.of(Bool):
50  do ActM<Bool>:
51    now : U32 <- Act.lift(U32, Clock.now_s())
52    m : Result<&1, &1, U32 & String, U32> <- Act.lift(Result<&1, &1, U32 & String, U32>, Dirlock.mtime(dir))
53    return stale_of(m, now, staleness)

Uses (13)

Used by (1)