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

Method del_tree

atomic-core/src/pristine/txn/write/mod.rs:1362–1375  ·  view source on GitHub ↗
(&mut self, path: &str)

Source from the content-addressed store, hash-verified

1360 }
1361
1362 fn del_tree(&mut self, path: &str) -> PristineResult<Option<Inode>> {
1363 let inode = {
1364 let mut table = self.txn.open_table(TREE)?;
1365 let removed = table.remove(path)?;
1366 removed.map(|value| Inode::new(value.value()))
1367 };
1368
1369 if let Some(inode) = inode {
1370 let mut table = self.txn.open_table(REV_TREE)?;
1371 table.remove(inode.get())?;
1372 }
1373
1374 Ok(inode)
1375 }
1376
1377 fn put_file_index(
1378 &mut self,

Callers 9

test_tree_operationsFunction · 0.80
write_import_recordedMethod · 0.80
insert_changeMethod · 0.80
write_recordedMethod · 0.80
remove_from_treeFunction · 0.80
move_trackedFunction · 0.80

Calls 2

removeMethod · 0.65
getMethod · 0.65

Tested by 1

test_tree_operationsFunction · 0.64