MCPcopy Create free account
hub / github.com/apache/datafusion / maybe_write_json

Method maybe_write_json

benchmarks/src/util/run.rs:178–183  ·  view source on GitHub ↗

Write data as json into output path if it exists.

(&self, maybe_path: Option<impl AsRef<Path>>)

Source from the content-addressed store, hash-verified

176
177 /// Write data as json into output path if it exists.
178 pub fn maybe_write_json(&self, maybe_path: Option<impl AsRef<Path>>) -> Result<()> {
179 if let Some(path) = maybe_path {
180 std::fs::write(path, self.to_json())?;
181 };
182 Ok(())
183 }
184}

Callers 13

runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80

Calls 1

to_jsonMethod · 0.80

Tested by

no test coverage detected