MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / _smart_save_xml

Method _smart_save_xml

src/bcf/bcf/v3/bcfxml.py:190–194  ·  view source on GitHub ↗
(self, destination_zip: ZipFileInterface, item: Any, target: str)

Source from the content-addressed store, hash-verified

188 self._smart_save_xml(destination_zip, self._extensions, "extensions.xml")
189
190 def _smart_save_xml(self, destination_zip: ZipFileInterface, item: Any, target: str) -> None:
191 if item:
192 self._save_xml(destination_zip, target, item)
193 elif self._zip_file and zipfile.Path(self._zip_file, target).exists():
194 destination_zip.writestr(target, self._zip_file.read(target))
195
196 def _save_xml(self, destination_zip: ZipFileInterface, inner_file: str, xml_obj: Any) -> None:
197 destination_zip.writestr(inner_file, self._xml_handler.serialize(xml_obj))

Callers 2

_save_projectMethod · 0.95
_save_extensionsMethod · 0.95

Calls 3

_save_xmlMethod · 0.95
writestrMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected