cap-primitives 4.0.1

Capability-based primitives
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::get_path::concatenate;
use crate::fs::DirOptions;
use std::path::Path;
use std::{fs, io};

/// *Unsandboxed* function similar to `create_dir`, but which does not perform
/// sandboxing.
///
/// Windows doesn't have any extra flags in `DirOptions`, so the `options`
/// parameter is ignored.
pub(crate) fn create_dir_unchecked(
    start: &fs::File,
    path: &Path,
    _options: &DirOptions,
) -> io::Result<()> {
    let out_path = concatenate(start, path)?;
    fs::create_dir(out_path)
}