Verify that a B2 object matches a local file (or an expected SHA-1) without
transferring the body.
Three modes, in priority order:
expected-sha1 input set → compare the remote object's SHA-1 to that
literal value. No local read.
destination input is an existing local file → compute that file's
SHA-1 locally and compare to the remote.
Neither → fail.
In all modes, the remote SHA-1 is fetched via a HEAD request (header
x-bz-content-sha1). Large files uploaded via multipart return null from
B2 here because B2 stores the per-part SHA-1s but not a whole-file SHA-1;
HEAD-only verification cannot validate those objects, even when
expected-sha1 is supplied.
Verify that a B2 object matches a local file (or an expected SHA-1) without transferring the body.
Three modes, in priority order:
expected-sha1input set → compare the remote object's SHA-1 to that literal value. No local read.destinationinput is an existing local file → compute that file's SHA-1 locally and compare to the remote.In all modes, the remote SHA-1 is fetched via a HEAD request (header
x-bz-content-sha1). Large files uploaded via multipart returnnullfrom B2 here because B2 stores the per-part SHA-1s but not a whole-file SHA-1; HEAD-only verification cannot validate those objects, even whenexpected-sha1is supplied.