MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / collect_files_recursive

Function collect_files_recursive

tests/agent_suite/agent_test.rs:182–192  ·  view source on GitHub ↗
(root: &Path, dir: &Path, out: &mut Vec<(std::path::PathBuf, Vec<u8>)>)

Source from the content-addressed store, hash-verified

180}
181
182fn collect_files_recursive(root: &Path, dir: &Path, out: &mut Vec<(std::path::PathBuf, Vec<u8>)>) {
183 for entry in std::fs::read_dir(dir).unwrap() {
184 let path = entry.unwrap().path();
185 if path.is_dir() {
186 collect_files_recursive(root, &path, out);
187 } else {
188 let relative = path.strip_prefix(root).unwrap().to_path_buf();
189 out.push((relative, std::fs::read(&path).unwrap()));
190 }
191 }
192}
193
194fn managed_skill_draft(id: &str, title: &str) -> ManagedSkillDraft {
195 ManagedSkillDraft {

Callers 1

install_hermes_defaultFunction · 0.85

Calls 2

pushMethod · 0.80
readFunction · 0.50

Tested by

no test coverage detected