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

Function add_file

atomic-repository/tests/view_split_test.rs:18–21  ·  view source on GitHub ↗
(repo: &Repository, repo_path: &Path, name: &str, content: &str)

Source from the content-addressed store, hash-verified

16use tempfile::TempDir;
17
18fn add_file(repo: &Repository, repo_path: &Path, name: &str, content: &str) {
19 fs::write(repo_path.join(name), content).expect("write file");
20 repo.add(name, Default::default()).expect("add file");
21}
22
23fn write_only(repo_path: &Path, name: &str, content: &str) {
24 fs::write(repo_path.join(name), content).expect("write file");

Calls 2

writeFunction · 0.85
addMethod · 0.45

Tested by

no test coverage detected