Remove a single file from tracking. This is the low-level function that actually modifies the database. # Arguments `txn` - A mutable transaction `path` - The normalized path string # Returns The inode that was removed, if any.
(txn: &mut T, path: &str)
| 206 | /// |
| 207 | /// The inode that was removed, if any. |
| 208 | pub fn remove_from_tree<T: MutTxnT>(txn: &mut T, path: &str) -> TrackingResult<Option<Inode>> { |
| 209 | // Remove from tree (this also removes from REV_TREE) |
| 210 | let inode = txn |
| 211 | .del_tree(path) |
| 212 | .map_err(|e| TrackingError::Database(e.to_string()))?; |
| 213 | |
| 214 | // If there was an inode, also remove its position mapping and directory marker |
| 215 | if let Some(inode) = inode { |
| 216 | let _ = txn.del_inode(inode); |
| 217 | // Remove directory marker if present |
| 218 | let _ = txn.del_directory(inode); |
| 219 | } |
| 220 | |
| 221 | Ok(inode) |
| 222 | } |
| 223 | |
| 224 | /// Remove a directory from tracking. |
| 225 | /// |