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

Method canonical_path

src/borg/helpers/parseformat.py:701–714  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

699 return self._host.lstrip("[").rstrip("]")
700
701 def canonical_path(self):
702 if self.proto in ("file", "socket"):
703 return self.path
704 if self.proto == "rclone":
705 return f"{self.proto}:{self.path}"
706 if self.proto in ("sftp", "ssh", "s3", "b2", "http", "https"):
707 return (
708 f"{self.proto}://"
709 f"{(self.user + '@') if self.user else ''}"
710 f"{self._host if self._host else ''}"
711 f"{self.port if self.port else ''}/"
712 f"{self.path}"
713 )
714 raise NotImplementedError(self.proto)
715
716 def with_timestamp(self, timestamp):
717 # note: this only affects the repository URL/path, not the archive name!

Callers 15

saveMethod · 0.45
__repr__Method · 0.45
__repr__Method · 0.45
__str__Method · 0.45
_loadMethod · 0.45
sanity_checkMethod · 0.45
find_keyMethod · 0.45
loadMethod · 0.45
load_keyblobMethod · 0.45
defaultMethod · 0.45
do_repo_infoMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected