MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / output_file

Function output_file

crates/hyperqueue/src/client/output/cli.rs:1409–1425  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

1407}
1408
1409fn output_file(path: &Path) {
1410 let stdout = std::io::stdout();
1411 let mut stdout = stdout.lock();
1412
1413 match File::open(path) {
1414 Ok(mut file) => {
1415 let copy = std::io::copy(&mut file, &mut stdout);
1416 if let Err(error) = copy {
1417 log::warn!(
1418 "Could not output contents of `{}`: {error:?}",
1419 path.display()
1420 );
1421 }
1422 }
1423 Err(error) => log::warn!("File at `{}` cannot be opened: {error:?}", path.display()),
1424 };
1425}
1426
1427fn session_to_cell(is_open: bool) -> CellStruct {
1428 if is_open {

Callers 2

print_job_outputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected