MCPcopy Create free account
hub / github.com/daniel2005d/mapXplore / _write_content

Method _write_content

lib/save_manager.py:25–32  ·  view source on GitHub ↗
(self, content, name)

Source from the content-addressed store, hash-verified

23 os.makedirs(directory)
24
25 def _write_content(self, content, name):
26
27 if isinstance(content, bytes):
28 with(open(name,'wb')) as fb:
29 fb.write(content)
30 else:
31 with(open(name,'w')) as fb:
32 fb.write(content)
33
34 def save(self, content, format, name=None, directory:str=None) -> str:
35 output_directory = directory if directory is not None else self._output

Callers 1

saveMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected