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

Method observation

atomic-repository/src/change_source/performance.rs:46–65  ·  view source on GitHub ↗
(&self, path: &RepoPath)

Source from the content-addressed store, hash-verified

44 }
45
46 fn observation(&self, path: &RepoPath) -> ObservedFile {
47 let index = Self::index(path);
48 let changed = self.metadata_changed == Some(index);
49 ObservedFile {
50 native_path: path.to_native().unwrap(),
51 device: Some(7),
52 inode: Some(index as u64 + 1),
53 mtime: Some(FileIndexTimestamp {
54 seconds: if changed { 2 } else { 1 },
55 nanoseconds: 0,
56 }),
57 ctime: Some(FileIndexTimestamp {
58 seconds: if changed { 2 } else { 1 },
59 nanoseconds: 0,
60 }),
61 size: CONTENT.len() as u64,
62 mode: Some(0o644),
63 kind: ObservedKind::Regular,
64 }
65 }
66}
67
68impl FilesystemProvider for SyntheticFilesystem {

Callers 1

observeMethod · 0.80

Calls 3

to_nativeMethod · 0.80
unwrapMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected