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

Method create

atomic-core/src/change/ops.rs:132–139  ·  view source on GitHub ↗

Creates a file creation operation. # Arguments `trunk_id` - The trunk ID for the new file `path` - The file path `encoding` - Optional text encoding (None for binary files)

(trunk_id: TrunkId, path: String, encoding: Option<Encoding>)

Source from the content-addressed store, hash-verified

130 /// * `path` - The file path
131 /// * `encoding` - Optional text encoding (None for binary files)
132 pub fn create(trunk_id: TrunkId, path: String, encoding: Option<Encoding>) -> Self {
133 Self {
134 trunk_id,
135 path: path.clone(),
136 trunk_op: Some(TrunkOp::Create { path, encoding }),
137 line_ops: Vec::new(),
138 }
139 }
140
141 /// Creates a file deletion operation.
142 pub fn delete(trunk_id: TrunkId, path: String) -> Self {

Callers 7

session.test.tsFile · 0.45
try_append_agent_traceFunction · 0.45
try_turn_end_lockMethod · 0.45
with_accumulatorMethod · 0.45
save_accumulatorMethod · 0.45
write_fileMethod · 0.45
openMethod · 0.45

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected