def enc.check

bend-kit-tar@0.3.0.0 · tar.bend:688

import bend-kit-tar@0.3.0.0/tar.bend as Tar
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

688# A name must be non-empty and hold no NUL, which the header's name field could not keep.
689def enc.check(+t: U32, +mode: U32, +dl: U32, db: Array<U32>, out: Bytes.Bytes, r: Bytes.Bytes & Maybe<&2, U32>) -> Maybe<&1, Bytes.Bytes>:
690  Bytes.Bytes{+ol, ob} = out
691  (name, +m) = r
692  Bytes.Bytes{+nl, nb} = name
693  +fits = enc.room(ol, dl, nl, U32.is_lt(100, nl))
694  enc.ok(U32.is_ne(nl, 0) && (Maybe.is_none(&2, U32, m) && fits), nb, nl, Bytes.Bytes{ol, ob}, t, mode, dl, db)

Uses (12)

Used by (1)