MCPcopy
hub / github.com/borgbackup/borg / prefixed_key

Method prefixed_key

src/borg/legacyremote.py:795–799  ·  view source on GitHub ↗
(self, key, complete)

Source from the content-addressed store, hash-verified

793 self.size_limit = int(min(available_space * 0.25, 2**31))
794
795 def prefixed_key(self, key, complete):
796 # just prefix another byte telling whether this key refers to a complete chunk
797 # or a without-data-metadata-only chunk (see also read_data param).
798 prefix = b"\x01" if complete else b"\x00"
799 return prefix + key
800
801 def key_filename(self, key):
802 return os.path.join(self.basedir, bin_to_hex(key))

Callers 2

add_entryMethod · 0.95
get_manyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected