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

Method modified

atomic-core/src/record/detect.rs:452–473  ·  view source on GitHub ↗

Create a new file change for a modified file. # Arguments `path` - Path to the file `inode` - File's inode `position` - Position in the graph `diff_ops` - Diff operations describing changes `old_encoding` - Encoding in pristine `new_encoding` - Encoding in working copy

(
        path: impl Into<String>,
        inode: Inode,
        position: Position<NodeId>,
        diff_ops: Vec<DiffOp>,
        old_encoding: Encoding,
        new_encoding: Encoding,
    )

Source from the content-addressed store, hash-verified

450 /// * `old_encoding` - Encoding in pristine
451 /// * `new_encoding` - Encoding in working copy
452 pub fn modified(
453 path: impl Into<String>,
454 inode: Inode,
455 position: Position<NodeId>,
456 diff_ops: Vec<DiffOp>,
457 old_encoding: Encoding,
458 new_encoding: Encoding,
459 ) -> Self {
460 Self {
461 path: path.into(),
462 inode: Some(inode),
463 position: Some(position),
464 kind: FileChangeKind::Modified {
465 diff_ops,
466 old_encoding,
467 new_encoding,
468 },
469 metadata: None,
470 size: None,
471 mtime: None,
472 }
473 }
474
475 /// Create a new file change for a deleted file.
476 ///

Callers

nothing calls this directly

Calls 2

iterMethod · 0.45
is_modifiedMethod · 0.45

Tested by

no test coverage detected