MCPcopy
hub / github.com/legendary-gl/legendary / write

Method write

legendary/models/manifest.py:306–336  ·  view source on GitHub ↗
(self, bio)

Source from the content-addressed store, hash-verified

304 return _meta
305
306 def write(self, bio):
307 meta_start = bio.tell()
308
309 bio.write(struct.pack('<I', 0)) # placeholder size
310 bio.write(struct.pack('B', self.data_version))
311 bio.write(struct.pack('<I', self.feature_level))
312 bio.write(struct.pack('B', self.is_file_data))
313 bio.write(struct.pack('<I', self.app_id))
314 write_fstring(bio, self.app_name)
315 write_fstring(bio, self.build_version)
316 write_fstring(bio, self.launch_exe)
317 write_fstring(bio, self.launch_command)
318
319 bio.write(struct.pack('<I', len(self.prereq_ids)))
320 for preqre_id in self.prereq_ids:
321 write_fstring(bio, preqre_id)
322
323 write_fstring(bio, self.prereq_name)
324 write_fstring(bio, self.prereq_path)
325 write_fstring(bio, self.prereq_args)
326
327 if self.data_version >= 1:
328 write_fstring(bio, self.build_id)
329 if self.data_version >= 2:
330 write_fstring(bio, self.uninstall_action_path)
331 write_fstring(bio, self.uninstall_action_args)
332
333 meta_end = bio.tell()
334 bio.seek(meta_start)
335 bio.write(struct.pack('<I', meta_end - meta_start))
336 bio.seek(meta_end)
337
338
339class CDL:

Callers

nothing calls this directly

Calls 2

write_fstringFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected