MCPcopy Create free account
hub / github.com/LOLINTERNETZ/vscodeoffline / save_state

Method save_state

vscoffline/sync.py:140–150  ·  view source on GitHub ↗
(self, destination)

Source from the content-addressed store, hash-verified

138 return True
139
140 def save_state(self, destination):
141 destination = os.path.join(destination, self.identity)
142 if not os.path.isdir(destination):
143 os.makedirs(destination)
144 # Write version details blob as latest
145 vsc.Utility.write_json(os.path.join(
146 destination, self.quality, 'latest.json'), self)
147 # Write version details blob as the commit id
148 if self.version:
149 vsc.Utility.write_json(os.path.join(
150 destination, self.quality, f'{self.version}.json'), self)
151
152 def __repr__(self):
153 strs = f"<{self.__class__.__name__}> {self.quality}/{self.identity}"

Callers 1

sync.pyFile · 0.45

Calls 1

write_jsonMethod · 0.80

Tested by

no test coverage detected