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

Method add_file

atomic-core/src/output/repo/tree.rs:688–694  ·  view source on GitHub ↗

Add a file item.

(&mut self, item: TreeItem)

Source from the content-addressed store, hash-verified

686
687 /// Add a file item.
688 pub fn add_file(&mut self, item: TreeItem) {
689 if item.depth > self.max_depth_reached {
690 self.max_depth_reached = item.depth;
691 }
692 self.files_count += 1;
693 self.items.push(item);
694 }
695
696 /// Add a directory item.
697 pub fn add_directory(&mut self, item: TreeItem) {

Callers 8

collect_treeFunction · 0.45
test_result_add_fileFunction · 0.45
test_result_sort_by_pathFunction · 0.45
test_result_cloneFunction · 0.45

Calls 1

pushMethod · 0.45

Tested by 7

test_result_add_fileFunction · 0.36
test_result_sort_by_pathFunction · 0.36
test_result_cloneFunction · 0.36