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

Method prefixed_key

src/borg/remote.py:1135–1139  ·  view source on GitHub ↗
(self, key, complete)

Source from the content-addressed store, hash-verified

1133 self.size_limit = int(min(available_space * 0.25, 2**31))
1134
1135 def prefixed_key(self, key, complete):
1136 # just prefix another byte telling whether this key refers to a complete chunk
1137 # or a without-data-metadata-only chunk (see also read_data param).
1138 prefix = b"\x01" if complete else b"\x00"
1139 return prefix + key
1140
1141 def key_filename(self, key):
1142 return os.path.join(self.basedir, bin_to_hex(key))

Callers 3

add_entryMethod · 0.95
get_manyMethod · 0.95
test_cache_corruptionMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_cache_corruptionMethod · 0.36