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

Method get_file_inode

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

Get the inode for a tracked file. Returns `None` if the file is not tracked. # Arguments `path` - Path to look up

(
        &self,
        path: P,
    )

Source from the content-addressed store, hash-verified

483 ///
484 /// * `path` - Path to look up
485 pub fn get_file_inode<P: AsRef<Path>>(
486 &self,
487 path: P,
488 ) -> Result<Option<Inode>, RepositoryError> {
489 let normalized = normalize_path(path.as_ref());
490
491 let txn = self
492 .pristine
493 .read_txn()
494 .map_err(|e| RepositoryError::Database(e.to_string()))?;
495
496 get_inode(&txn, &normalized).map_err(|e| RepositoryError::Database(e.to_string()))
497 }
498
499 /// List all tracked files in the repository.
500 ///

Callers 1

test_repo_move_fileFunction · 0.80

Calls 4

get_inodeFunction · 0.85
as_refMethod · 0.80
read_txnMethod · 0.80
normalize_pathFunction · 0.50

Tested by 1

test_repo_move_fileFunction · 0.64