#[allow(unused_imports)]
use crate::filesystem::primitives::open_unchecked;
use crate::filesystem::primitives::{
FollowSymlinks, dir_options, open, open_ambient_dir_impl, readdir_options,
};
use std::path::Path;
use std::{fs, io};
#[inline]
pub fn open_dir(start: &fs::File, path: &Path) -> io::Result<fs::File> {
open(start, path, &dir_options())
}
#[inline]
#[allow(dead_code)]
pub(crate) fn open_dir_unchecked(start: &fs::File, path: &Path) -> io::Result<fs::File> {
open_unchecked(start, path, &dir_options()).map_err(Into::into)
}
#[inline]
#[allow(dead_code)]
pub(crate) fn open_dir_for_reading_unchecked(
start: &fs::File,
path: &Path,
follow: FollowSymlinks,
) -> io::Result<fs::File> {
open_unchecked(start, path, readdir_options().follow(follow)).map_err(Into::into)
}
#[inline]
pub fn open_ambient_dir(path: &Path) -> io::Result<fs::File> {
open_ambient_dir_impl(path)
}