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

Method is_tracked

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

Check if a file is tracked. # Arguments `path` - Path to check # Example ```rust,ignore if repo.is_tracked("src/main.rs")? { println!("File is tracked"); } ```

(&self, path: P)

Source from the content-addressed store, hash-verified

703 /// }
704 /// ```
705 pub fn is_tracked<P: AsRef<Path>>(&self, path: P) -> Result<bool, RepositoryError> {
706 let normalized = normalize_path(path.as_ref());
707
708 let txn = self
709 .pristine
710 .read_txn()
711 .map_err(|e| RepositoryError::Database(e.to_string()))?;
712
713 is_tracked(&txn, &normalized).map_err(|e| RepositoryError::Database(e.to_string()))
714 }
715
716 /// Get the inode for a tracked file.
717 ///

Callers 3

runMethod · 0.80
move_fileMethod · 0.80

Calls 4

is_trackedFunction · 0.85
as_refMethod · 0.80
read_txnMethod · 0.80
normalize_pathFunction · 0.50