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

Function retrieve_content

atomic-core/src/record/workflow/retrieve.rs:198–210  ·  view source on GitHub ↗

Retrieve content from the pristine graph. This is the main entry point for retrieving file content from the graph. It handles the full pipeline of retrieving the alive graph, computing order, and collecting content. # Arguments `txn` - Transaction providing graph access `changes` - Change store for span content `position` - Position in the graph (identifies the file) # Returns The file conten

(
    txn: &T,
    changes: &C,
    position: Position<NodeId>,
)

Source from the content-addressed store, hash-verified

196/// let text = String::from_utf8_lossy(&content);
197/// ```
198pub fn retrieve_content<T, C>(
199 txn: &T,
200 changes: &C,
201 position: Position<NodeId>,
202) -> RecordResult<Vec<u8>>
203where
204 T: GraphTxnT,
205 C: ChangeStore,
206{
207 let result =
208 retrieve_content_with_options(txn, changes, position, RetrieveContentOptions::new())?;
209 Ok(result.content)
210}
211
212/// Retrieve content with options.
213///

Calls 1