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

Method writestr

src/bcf/bcf/inmemory_zipfile.py:33–36  ·  view source on GitHub ↗

Appends a file with name filename_in_zip and contents of file_contents to the in-memory zip.

(self, filename_in_zip: str | zipfile.ZipInfo, file_contents: bytes | str)

Source from the content-addressed store, hash-verified

31 self.in_memory_zip.debug = debug
32
33 def writestr(self, filename_in_zip: str | zipfile.ZipInfo, file_contents: bytes | str) -> None:
34 """Appends a file with name filename_in_zip and contents of
35 file_contents to the in-memory zip."""
36 self.in_memory_zip.writestr(filename_in_zip, file_contents)
37
38 def write_to_file(self, filename: str | bytes | PathLike[str] | PathLike[bytes] | int) -> None:
39 """Writes the in-memory zip to a file."""

Callers 15

_save_projectMethod · 0.45
_save_versionMethod · 0.45
_smart_save_xmlMethod · 0.45
_save_xmlMethod · 0.45
saveMethod · 0.45
_save_xmlMethod · 0.45
_save_bim_snippetMethod · 0.45
_save_reference_filesMethod · 0.45
_save_snapshotMethod · 0.45
_save_visinfoMethod · 0.45
_save_bitmapsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected