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

Method snapshot_inodes

atomic-core/src/pristine/txn/read.rs:827–840  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

825 }
826
827 fn snapshot_inodes(&self) -> PristineResult<Vec<(Inode, Position<NodeId>)>> {
828 let table = self.txn.open_table(INODES)?;
829 let mut rows = Vec::new();
830 for entry in table.iter()? {
831 let (inode, position) = entry?;
832 let (change_id, pos) = decode_position(position.value());
833 rows.push((
834 Inode::new(inode.value()),
835 Position::new(NodeId::new(change_id), ChangePosition::new(pos)),
836 ));
837 }
838 rows.sort_unstable();
839 Ok(rows)
840 }
841
842 fn snapshot_rev_inodes(&self) -> PristineResult<Vec<(Position<NodeId>, Inode)>> {
843 let table = self.txn.open_table(REV_INODES)?;

Callers 3

sandbox_slice_inodesMethod · 0.45

Calls 4

decode_positionFunction · 0.85
valueMethod · 0.80
iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected