def safe

ezx@1.11.0.0 · src/remove/plan.bend:89

import ezx@1.11.0.0/src/remove/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M

89# a hash `rm -rf .ez/lib/<hash>` removes one tree for: a `0x` name with no
90# path separator in it. `M.parse` does not check a hash's shape, and a ledger
91# is text a person edits, so this is checked before a tree is removed.
92def safe(+hash: String) -> Bool:
93  Bool.and(String.starts_with(hash, "0x"), chars.ok(hash))

Uses (5)

Used by (1)