MCPcopy Create free account
hub / github.com/alibaba/GraphScope / append

Method append

python/graphscope/analytical/udf/utils.py:264–278  ·  view source on GitHub ↗

Append a file to the zip file. Parameters ---------- filepath: str The path to write the file in the zip file. content: str or bytes The content that will be written into the zip file. See Also -------- ZipFile.writest

(self, filepath, content)

Source from the content-addressed store, hash-verified

262 )
263
264 def append(self, filepath, content):
265 """Append a file to the zip file.
266
267 Parameters
268 ----------
269 filepath: str
270 The path to write the file in the zip file.
271 content: str or bytes
272 The content that will be written into the zip file.
273
274 See Also
275 --------
276 ZipFile.writestr: write file to zip files.
277 """
278 self.zip_file.writestr(zipfile.ZipInfo(filepath), content)
279
280 def read_bytes(self, raw=False):
281 """Read bytes value of the zip file.

Callers 3

add_libMethod · 0.95
wrap_initFunction · 0.95
_pack_jarMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected