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

Method iter_file_index_v2

atomic-core/src/pristine/txn/write/tree.rs:223–238  ·  view source on GitHub ↗
(
        &self,
        working_copy: WorkingCopyId,
    )

Source from the content-addressed store, hash-verified

221 }
222
223 fn iter_file_index_v2(
224 &self,
225 working_copy: WorkingCopyId,
226 ) -> PristineResult<Vec<(Vec<u8>, FileIndexV2Entry)>> {
227 let table = self.txn.open_table(FILE_INDEX_V2)?;
228 let mut rows = Vec::new();
229 for result in table.iter()? {
230 let (key, value) = result?;
231 let key = FileIndexV2Key::decode(key.value())?;
232 let entry = decode_file_index_v2(value.value())?;
233 if key.working_copy == working_copy {
234 rows.push((key.path, entry));
235 }
236 }
237 Ok(rows)
238 }
239}
240
241impl FileIndexV2MutTxnT for WriteTxn<'_> {

Callers

nothing calls this directly

Calls 5

decode_file_index_v2Function · 0.85
valueMethod · 0.80
decodeFunction · 0.50
iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected