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

Method del_file_index

atomic-repository/src/repository/tracking.rs:526–540  ·  view source on GitHub ↗

Remove a file from the FILE_INDEX. Call this when a file is deleted (e.g., during git import cleanup) so that `status` doesn't show it as a stale entry.

(&self, path: &str)

Source from the content-addressed store, hash-verified

524 /// Call this when a file is deleted (e.g., during git import cleanup)
525 /// so that `status` doesn't show it as a stale entry.
526 pub fn del_file_index(&self, path: &str) -> Result<(), RepositoryError> {
527 let mut txn = self
528 .pristine
529 .write_txn()
530 .map_err(|e| RepositoryError::Database(e.to_string()))?;
531
532 let normalized = path.replace('\\', "/");
533 txn.del_file_index(&normalized)
534 .map_err(|e| RepositoryError::Database(e.to_string()))?;
535
536 txn.commit()
537 .map_err(|e| RepositoryError::Database(e.to_string()))?;
538
539 Ok(())
540 }
541
542 /// Remove multiple files from the FILE_INDEX in a single write transaction.
543 ///

Callers 4

del_file_index_batchMethod · 0.45
unrecordMethod · 0.45
recordMethod · 0.45

Calls 3

write_txnMethod · 0.80
commitMethod · 0.80
replaceMethod · 0.45