wasmtime-wasi 48.0.2

WASI implementation in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! This defines `stat`, the primary entrypoint to sandboxed metadata querying.

use crate::filesystem::primitives::{FollowSymlinks, Metadata, stat_impl};
use std::path::Path;
use std::{fs, io};

/// Perform an `fstatat`-like operation, ensuring that the resolution of the
/// path never escapes the directory tree rooted at `start`.
#[inline]
pub fn stat(start: &fs::File, path: &Path, follow: FollowSymlinks) -> io::Result<Metadata> {
    // Call the underlying implementation.
    stat_impl(start, path, follow)
}