def is_stale
import cswap-bend-cli@0.1.0.0/dirlock.bend as Dirlockimport 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)