2020-04-15 16:31:05 -07:00
|
|
|
// WASI:
|
2020-04-01 17:09:51 -07:00
|
|
|
// mapdir: .:tests/wasi_test_resources/test_fs/hamlet
|
2019-05-20 17:43:50 -07:00
|
|
|
|
|
|
|
use std::fs;
|
|
|
|
|
|
|
|
fn main() {
|
2019-07-15 10:36:12 -07:00
|
|
|
#[cfg(not(target_os = "wasi"))]
|
2020-04-01 17:09:51 -07:00
|
|
|
std::env::set_current_dir("tests/wasi_test_resources/test_fs/hamlet").unwrap();
|
2019-07-15 10:36:12 -07:00
|
|
|
|
2019-05-20 17:43:50 -07:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|