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

Method create

src/borg/cache.py:259–269  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

257 return self.config_path.exists()
258
259 def create(self):
260 assert not self.exists()
261 config = configparser.ConfigParser(interpolation=None)
262 config.add_section("cache")
263 config.set("cache", "version", "1")
264 config.set("cache", "repository", self.repository.id_str)
265 config.set("cache", "manifest", "")
266 config.add_section("integrity")
267 config.set("integrity", "manifest", "")
268 with SaveFile(self.config_path) as fd:
269 config.write(fd)
270
271 def open(self):
272 self.load()

Callers 1

createMethod · 0.45

Calls 3

existsMethod · 0.95
SaveFileClass · 0.85
writeMethod · 0.45

Tested by

no test coverage detected