wasmer/lib/wasi-tests/wasitests/fs_sandbox_test.rs

11 lines
285 B
Rust
Raw Normal View History

2019-05-22 22:57:12 +00:00
fn main() {
#[cfg(target = "wasi")]
let result = std::fs::read_dir("..");
#[cfg(not(target = "wasi"))]
let result: Result<(), String> = Err("placeholder".to_string());
println!(
"Reading the parent directory was okay? {:?}",
result.is_ok()
);
}