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

Method put_inode

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

Source from the content-addressed store, hash-verified

1559 }
1560
1561 fn put_inode(&mut self, inode: Inode, pos: Position<NodeId>) -> PristineResult<()> {
1562 let pos_bytes = encode_position(pos.change.get(), pos.pos.get());
1563 {
1564 let mut table = self.txn.open_table(INODES)?;
1565 table.insert(inode.get(), &pos_bytes)?;
1566 }
1567 {
1568 let mut table = self.txn.open_table(REV_INODES)?;
1569 table.insert(&pos_bytes, inode.get())?;
1570 }
1571 Ok(())
1572 }
1573
1574 fn del_inode(&mut self, inode: Inode) -> PristineResult<Option<Position<NodeId>>> {
1575 let pos = {

Callers 6

test_inode_operationsFunction · 0.80
write_import_recordedMethod · 0.80
insert_changeMethod · 0.80
write_recordedMethod · 0.80

Calls 3

encode_positionFunction · 0.85
getMethod · 0.65
insertMethod · 0.45

Tested by 1

test_inode_operationsFunction · 0.64