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

Function write_file

tests/dashboard_api_test/dashboard_api_support.rs:114–123  ·  view source on GitHub ↗
(path: &Path, content: &str)

Source from the content-addressed store, hash-verified

112}
113
114pub(crate) fn write_file(path: &Path, content: &str) {
115 if let Some(parent) = path.parent() {
116 if let Err(err) = fs::create_dir_all(parent) {
117 panic!("failed to create {}: {err}", parent.display());
118 }
119 }
120 if let Err(err) = fs::write(path, content) {
121 panic!("failed to write {}: {err}", path.display());
122 }
123}
124
125pub(crate) async fn setup_project(project_root: &Path) -> TraceDecay {
126 write_file(

Calls 1

writeFunction · 0.85