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

Method get_file_inode

atomic-repository/src/repository/tracking.rs:723–735  ·  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

721 ///
722 /// * `path` - Path to look up
723 pub fn get_file_inode<P: AsRef<Path>>(
724 &self,
725 path: P,
726 ) -> Result<Option<Inode>, RepositoryError> {
727 let normalized = normalize_path(path.as_ref());
728
729 let txn = self
730 .pristine
731 .read_txn()
732 .map_err(|e| RepositoryError::Database(e.to_string()))?;
733
734 get_inode(&txn, &normalized).map_err(|e| RepositoryError::Database(e.to_string()))
735 }
736
737 /// List all tracked files in the repository.
738 ///

Calls 4

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