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

Method iter_file_index

atomic-core/src/pristine/txn/write/tree.rs:189–203  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

187 }
188
189 fn iter_file_index(&self) -> PristineResult<Vec<FileIndexEntry>> {
190 let table = match self.txn.open_table(FILE_INDEX) {
191 Ok(t) => t,
192 Err(redb::TableError::TableDoesNotExist(_)) => return Ok(Vec::new()),
193 Err(e) => return Err(PristineError::from(e)),
194 };
195 let mut entries = Vec::new();
196 for result in table.iter()? {
197 let (key, value) = result?;
198 let path = key.value().to_string();
199 let (secs, nanos, size, hash) = decode_file_index(value.value());
200 entries.push((path, secs, nanos, size, hash));
201 }
202 Ok(entries)
203 }
204}
205
206impl FileIndexV2TxnT for WriteTxn<'_> {

Callers

nothing calls this directly

Calls 4

decode_file_indexFunction · 0.85
valueMethod · 0.80
iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected