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

Function retrieve_content

atomic-core/src/record/workflow/retrieve.rs:200–212  ·  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

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

Calls 1