use super::open_parent;
use crate::fs::{create_dir_unchecked, strip_dir_suffix, DirOptions, MaybeOwnedFile};
use std::path::Path;
use std::{fs, io};
pub(crate) fn create_dir(start: &fs::File, path: &Path, options: &DirOptions) -> io::Result<()> {
let start = MaybeOwnedFile::borrowed(start);
let path = strip_dir_suffix(path);
let (dir, basename) = open_parent(start, &*path)?;
create_dir_unchecked(&dir, basename.as_ref(), options)
}