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

Function update_directory_flags

atomic-repository/src/tracking/tree_ops.rs:682–693  ·  view source on GitHub ↗

Update directory flags (e.g., when adding/removing children). # Arguments `txn` - A mutable transaction `inode` - The directory's inode `flags` - New flags to set

(
    txn: &mut T,
    inode: Inode,
    flags: u8,
)

Source from the content-addressed store, hash-verified

680/// * `inode` - The directory's inode
681/// * `flags` - New flags to set
682pub fn update_directory_flags<T: MutTxnT>(
683 txn: &mut T,
684 inode: Inode,
685 flags: u8,
686) -> TrackingResult<()> {
687 TreeProjectionPlan::plan(
688 txn,
689 [TreeProjectionOperation::DirectoryFlags { inode, flags }],
690 )?
691 .apply(txn)?;
692 Ok(())
693}
694
695/// Mark a directory as having children (not empty).
696///

Callers

nothing calls this directly

Calls 2

planFunction · 0.85
applyMethod · 0.45

Tested by

no test coverage detected