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

Function resolve_created_inode

atomic-core/src/apply/file_ops.rs:986–998  ·  view source on GitHub ↗
(
    txn: &mut T,
    path: &str,
    created_inodes: &HashMap<String, Inode>,
)

Source from the content-addressed store, hash-verified

984// Low-Level Table Operations
985
986fn resolve_created_inode<T: MutTxnT>(
987 txn: &mut T,
988 path: &str,
989 created_inodes: &HashMap<String, Inode>,
990) -> PristineResult<Inode> {
991 if let Some(inode) = created_inodes.get(path) {
992 return Ok(*inode);
993 }
994 match txn.get_inode(path)? {
995 Some(inode) => Ok(inode),
996 None => txn.alloc_inode(),
997 }
998}
999
1000/// Store a trunk in the CRDT tables.
1001fn put_trunk<T: MutTxnT>(

Callers 2

apply_trunk_opFunction · 0.85

Calls 3

getMethod · 0.65
get_inodeMethod · 0.45
alloc_inodeMethod · 0.45

Tested by

no test coverage detected