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

Method record_file

atomic-core/src/output/repo/outcome.rs:225–228  ·  view source on GitHub ↗

Record a file write. # Arguments `path` - The path of the file that was written `bytes` - The number of bytes written # Example ```rust use atomic_core::output::repo::OutputOutcome; let mut outcome = OutputOutcome::new(); outcome.record_file("src/main.rs", 1024); assert_eq!(outcome.files_written(), 1); assert_eq!(outcome.bytes_written, 1024); ```

(&mut self, path: impl Into<String>, bytes: u64)

Source from the content-addressed store, hash-verified

223 /// assert_eq!(outcome.bytes_written, 1024);
224 /// ```
225 pub fn record_file(&mut self, path: impl Into<String>, bytes: u64) {
226 self.files.push(FileWritten::new(path, bytes));
227 self.bytes_written += bytes;
228 }
229
230 /// Record a directory creation.
231 ///

Callers 12

test_record_fileFunction · 0.45
test_iter_filesFunction · 0.45
test_merge_filesFunction · 0.45
test_merge_emptyFunction · 0.45
test_summary_one_fileFunction · 0.45
test_summary_combinedFunction · 0.45
test_displayFunction · 0.45
test_outcome_cloneFunction · 0.45
to_outcomeMethod · 0.45

Calls 1

pushMethod · 0.45

Tested by 11

test_record_fileFunction · 0.36
test_iter_filesFunction · 0.36
test_merge_filesFunction · 0.36
test_merge_emptyFunction · 0.36
test_summary_one_fileFunction · 0.36
test_summary_combinedFunction · 0.36
test_displayFunction · 0.36
test_outcome_cloneFunction · 0.36