Get the filesystem path for an attestation with the given hash. Attestations use the same two-level directory structure as changes but with the `.attest` extension. # Example ```rust,ignore let hash = Hash::of(b"test"); let path = store.attest_path(&hash); // e.g., ".atomic/changes/AB/ABCDEF1234567890....attest" ```
(&self, hash: &Hash)
| 26 | /// // e.g., ".atomic/changes/AB/ABCDEF1234567890....attest" |
| 27 | /// ``` |
| 28 | pub fn attest_path(&self, hash: &Hash) -> PathBuf { |
| 29 | let hash_str = hash.to_base32(); |
| 30 | let (prefix, _) = hash_str.split_at(HASH_PREFIX_LEN.min(hash_str.len())); |
| 31 | self.changes_dir.join(prefix).join(format!( |
| 32 | "{}.{}", |
| 33 | hash_str, |
| 34 | atomic_core::change::ATTESTATION_EXTENSION |
| 35 | )) |
| 36 | } |
| 37 | |
| 38 | /// Check if an attestation with the given hash exists on disk. |
| 39 | pub fn has_attestation(&self, hash: &Hash) -> bool { |
no test coverage detected