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

Method save

src/bcf/bcf/v3/document.py:53–62  ·  view source on GitHub ↗

Save the documents to the zip file.

(self, bcf_zip: ZipFileInterface)

Source from the content-addressed store, hash-verified

51 return cls(definition, documents=documents)
52
53 def save(self, bcf_zip: ZipFileInterface) -> None:
54 """Save the documents to the zip file."""
55 bcf_zip.writestr("documents.xml", self._xml_handler.serialize(self.definition))
56 if documents := self.definition.documents:
57 for doc in documents.document:
58 if doc.filename in self.documents:
59 bcf_zip.writestr(
60 f"documents/{doc.guid}",
61 self.documents[doc.filename],
62 )

Callers

nothing calls this directly

Calls 2

writestrMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected