MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / write

Method write

mserver/MasterService/src/mods.rs:37–41  ·  view source on GitHub ↗

Append a chunk verbatim. `WriteMultipart` uploads completed parts in the background, so memory stays bounded regardless of total size.

(&mut self, chunk: &[u8])

Source from the content-addressed store, hash-verified

35 /// Append a chunk verbatim. `WriteMultipart` uploads completed parts in the background, so
36 /// memory stays bounded regardless of total size.
37 pub fn write(&mut self, chunk: &[u8]) {
38 self.writer.write(chunk);
39 self.hasher.update(chunk);
40 self.size += chunk.len() as u64;
41 }
42}
43
44const MOD_METADATA_FILE: &str = "mod.json";

Callers 2

publish_modFunction · 0.45

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected