cap-primitives 0.16.1

Capability-based primitives
Documentation
1
2
3
4
5
6
7
8
9
use super::get_path::concatenate_or_return_absolute;
use std::{fs, io, path::Path};

/// *Unsandboxed* function similar to `remove_dir`, but which does not perform
/// sandboxing.
pub(crate) fn remove_dir_unchecked(start: &fs::File, path: &Path) -> io::Result<()> {
    let full_path = concatenate_or_return_absolute(start, path)?;
    fs::remove_dir(full_path)
}