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

Method tree

libatomic/tests/sandbox_service_test.rs:173–186  ·  view source on GitHub ↗
(&self, view: &str)

Source from the content-addressed store, hash-verified

171 }
172
173 fn tree(&self, view: &str) -> BTreeMap<String, String> {
174 self.with_repo(|repo| {
175 let mut files = BTreeMap::new();
176 repo.materialize_view_entries::<()>(view, |e| {
177 if e.kind == ViewEntryKind::File {
178 files.insert(e.path, String::from_utf8_lossy(&e.content).into_owned());
179 }
180 Ok(())
181 })
182 .unwrap()
183 .unwrap();
184 files
185 })
186 }
187
188 fn on_view(&self, view: &str, hash: &Hash) -> bool {
189 self.with_repo(|repo| repo.first_foreign_change(view, &[*hash]).unwrap().is_none())

Callers 15

runMethod · 0.80
runMethod · 0.80
input_blob_bytesFunction · 0.80
graph_stream_inputsMethod · 0.80
rolling_sampleFunction · 0.80
load_binding_at_refFunction · 0.80
observe_head_treeFunction · 0.80
git_head_pathsFunction · 0.80
git_branch_pathsFunction · 0.80

Calls 3

with_repoMethod · 0.80
unwrapMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected