MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / main

Function main

crates/test-programs/src/bin/p1_path_open_nonblock.rs:11–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9}
10
11fn main() {
12 let mut args = env::args();
13 let prog = args.next().unwrap();
14 let arg = if let Some(arg) = args.next() {
15 arg
16 } else {
17 eprintln!("usage: {prog} <scratch directory>");
18 process::exit(1);
19 };
20
21 // Open scratch directory
22 let dir_fd = match open_scratch_directory(&arg) {
23 Ok(dir_fd) => dir_fd,
24 Err(err) => {
25 eprintln!("{err}");
26 process::exit(1)
27 }
28 };
29
30 // Run the tests.
31 unsafe { try_path_open(dir_fd) }
32}

Callers

nothing calls this directly

Calls 4

open_scratch_directoryFunction · 0.85
try_path_openFunction · 0.85
unwrapMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected