mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-05 02:20:19 +00:00
21 lines
493 B
Rust
21 lines
493 B
Rust
// WASI:
|
|
// dir: .
|
|
|
|
use std::fs;
|
|
use std::io::Read;
|
|
|
|
fn main() {
|
|
let mut this_file = fs::File::open("tests/wasi_test_resources/file_metadata.rs")
|
|
.expect("could not find src file");
|
|
let md = this_file.metadata().unwrap();
|
|
println!("is dir: {}", md.is_dir());
|
|
let filetype = md.file_type();
|
|
println!(
|
|
"filetype: {} {} {}",
|
|
filetype.is_dir(),
|
|
filetype.is_file(),
|
|
filetype.is_symlink()
|
|
);
|
|
println!("file info: {}", md.len());
|
|
}
|