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

Method put_metadata

mserver/MasterService/src/mods.rs:236–246  ·  view source on GitHub ↗

Write a catalog entry's `mod.json` (used by dev seeding; writes no artifact, so the seeded entry carries a synthetic `size_bytes` and isn't downloadable).

(&self, entry: &ModCatalogEntry)

Source from the content-addressed store, hash-verified

234 if let Some(prefix) = &self.prefix {
235 ObjectPath::from(format!("{}/{}", prefix.as_ref(), path.as_ref()))
236 } else {
237 path
238 }
239 }
240
241 fn list_prefix(&self) -> Option<&ObjectPath> {
242 self.prefix.as_ref()
243 }
244
245 fn strip_prefix<'a>(&self, path: &'a ObjectPath) -> &'a str {
246 let path = path.as_ref();
247 if let Some(prefix) = &self.prefix {
248 path.strip_prefix(prefix.as_ref())
249 .and_then(|rest| rest.strip_prefix('/'))

Callers 1

seed_dev_modsFunction · 0.80

Calls 2

store_pathMethod · 0.80
putMethod · 0.45

Tested by

no test coverage detected