wasmtime-wasi 48.0.2

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

use crate::filesystem::primitives::remove_dir_impl;
use std::path::Path;
use std::{fs, io};

/// Perform a `rmdirat`-like operation, ensuring that the resolution of the
/// path never escapes the directory tree rooted at `start`.
#[inline]
pub fn remove_dir(start: &fs::File, path: &Path) -> io::Result<()> {
    // Call the underlying implementation.
    remove_dir_impl(start, path)
}