MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / put_inodes

Method put_inodes

atomic-core/src/pristine/txn/write/mod.rs:1612–1621  ·  view source on GitHub ↗
(&mut self, inode: u64, pos: &Position<NodeId>)

Source from the content-addressed store, hash-verified

1610 }
1611
1612 fn put_inodes(&mut self, inode: u64, pos: &Position<NodeId>) -> PristineResult<()> {
1613 let mut inodes_table = self.txn.open_table(INODES)?;
1614 let mut rev_inodes_table = self.txn.open_table(REV_INODES)?;
1615
1616 let pos_bytes = encode_position(pos.change.get(), pos.pos.get());
1617
1618 inodes_table.insert(inode, &pos_bytes)?;
1619 rev_inodes_table.insert(&pos_bytes, inode)?;
1620 Ok(())
1621 }
1622
1623 fn commit(self) -> PristineResult<()> {
1624 self.txn.commit()?;

Callers

nothing calls this directly

Calls 3

encode_positionFunction · 0.85
getMethod · 0.65
insertMethod · 0.45

Tested by

no test coverage detected