Skip to main content

write_raw_run_to_path

Function write_raw_run_to_path 

Source
pub fn write_raw_run_to_path(run: &RawRun, output_path: &str) -> Result<()>
Expand description

Write a RawRun to disk as pretty-printed JSON, with the $schema pointer.

Creates parent directories if they don’t already exist. The file appears whole: it goes to a scratch file of its own and is renamed over the destination, so a reader never sees a half-written run and a failed write leaves the previous file intact.

§Errors

Returns an error if directory creation or file write fails.