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

Method metadata_only

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

Create a new file change for metadata-only changes. # Arguments `path` - Path to the file `inode` - File's inode `position` - Position in the graph `old_metadata` - Old metadata `new_metadata` - New metadata

(
        path: impl Into<String>,
        inode: Inode,
        position: Position<NodeId>,
        old_metadata: FileMetadata,
        new_metadata: FileMetadata,
    )

Source from the content-addressed store, hash-verified

534 /// * `old_metadata` - Old metadata
535 /// * `new_metadata` - New metadata
536 pub fn metadata_only(
537 path: impl Into<String>,
538 inode: Inode,
539 position: Position<NodeId>,
540 old_metadata: FileMetadata,
541 new_metadata: FileMetadata,
542 ) -> Self {
543 Self {
544 path: path.into(),
545 inode: Some(inode),
546 position: Some(position),
547 kind: FileChangeKind::MetadataOnly {
548 old_metadata,
549 new_metadata,
550 },
551 metadata: Some(new_metadata),
552 size: None,
553 mtime: None,
554 }
555 }
556
557 /// Set the metadata for this change.
558 pub fn with_metadata(mut self, metadata: FileMetadata) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected