MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / object_path

Method object_path

crates/core/src/host/disk_storage.rs:22–28  ·  view source on GitHub ↗
(&self, h: &Hash)

Source from the content-addressed store, hash-verified

20 }
21
22 fn object_path(&self, h: &Hash) -> PathBuf {
23 let hex = h.to_hex();
24 let (pre, suf) = hex.split_at(2);
25 let mut path = self.base.clone();
26 path.extend([pre, suf]);
27 path
28 }
29
30 #[tracing::instrument(level = "trace", skip(self))]
31 pub async fn get(&self, key: &Hash) -> io::Result<Option<Box<[u8]>>> {

Callers 3

getMethod · 0.80
putMethod · 0.80
pruneMethod · 0.80

Calls 3

to_hexMethod · 0.45
cloneMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected