MCPcopy Create free account
hub / github.com/assert-rs/assert_fs / write_file

Function write_file

src/fixture/tools.rs:322–326  ·  view source on GitHub ↗
(path: &path::Path, data: &path::Path)

Source from the content-addressed store, hash-verified

320}
321
322fn write_file(path: &path::Path, data: &path::Path) -> Result<(), FixtureError> {
323 ensure_parent_dir(path)?;
324 fs::copy(data, path).chain(FixtureError::new(FixtureKind::CopyFile))?;
325 Ok(())
326}
327
328fn copy_files<S>(
329 target: &path::Path,

Callers 1

write_fileMethod · 0.85

Calls 2

ensure_parent_dirFunction · 0.85
chainMethod · 0.80

Tested by

no test coverage detected