Creates a file creation operation.
(trunk_id: TrunkId, path: String, encoding: Option<Encoding>)
| 41 | |
| 42 | /// Creates a file creation operation. |
| 43 | pub fn create(trunk_id: TrunkId, path: String, encoding: Option<Encoding>) -> Self { |
| 44 | Self { |
| 45 | trunk_id, |
| 46 | path: path.clone(), |
| 47 | trunk_op: Some(TrunkOp::Create { path, encoding }), |
| 48 | line_ops: Vec::new(), |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | /// Creates a file deletion operation. |
| 53 | pub fn delete(trunk_id: TrunkId, path: String) -> Self { |