mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-15 15:15:40 +00:00
21 lines
441 B
Rust
21 lines
441 B
Rust
|
// Args:
|
||
|
// mapdir: .:wasitests/test_fs/hamlet
|
||
|
|
||
|
use std::fs;
|
||
|
|
||
|
fn main() {
|
||
|
#[cfg(not(target = "wasi"))]
|
||
|
let read_dir = fs::read_dir("wasitests/test_fs/hamlet").unwrap();
|
||
|
#[cfg(target = "wasi")]
|
||
|
let read_dir = fs::read_dir(".").unwrap();
|
||
|
let mut out = vec![];
|
||
|
for entry in read_dir {
|
||
|
out.push(format!("{:?}", entry.unwrap().path()));
|
||
|
}
|
||
|
out.sort();
|
||
|
|
||
|
for p in out {
|
||
|
println!("{}", p);
|
||
|
}
|
||
|
}
|