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

Function output_file

atomic-core/src/output/repo/file.rs:572–597  ·  view source on GitHub ↗

Output a single file from the repository graph to the working copy. This is the core function for reconstructing file content from the graph. It retrieves the alive graph for the file, computes the span ordering, and writes the content to the working copy with conflict markers if needed. # Arguments `txn` - Transaction providing graph access `changes` - Change store for retrieving span content

(
    txn: &T,
    changes: &C,
    working_copy: &W,
    inode: Inode,
    position: Position<NodeId>,
    path: &str,
    options: FileOutputOptions,
)

Source from the content-addressed store, hash-verified

570/// result.conflict_count());
571/// ```
572pub fn output_file<T, C, W>(
573 txn: &T,
574 changes: &C,
575 working_copy: &W,
576 inode: Inode,
577 position: Position<NodeId>,
578 path: &str,
579 options: FileOutputOptions,
580) -> Result<FileOutputResult, FileOutputError<W::Error>>
581where
582 T: GraphTxnT,
583 C: ChangeStore,
584 W: WorkingCopy,
585 W::Writer: Write,
586{
587 output_file_with_filter(
588 txn,
589 changes,
590 working_copy,
591 inode,
592 position,
593 path,
594 options,
595 None,
596 )
597}
598
599/// Output a single file from the graph with optional validated visibility.
600///

Callers

nothing calls this directly

Calls 1

output_file_with_filterFunction · 0.85

Tested by

no test coverage detected