1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#[allow(unused_imports)]
use crate::fs::open_unchecked;
use crate::fs::{dir_options, dir_path_options, open, open_ambient_dir_impl};
use std::{fs, io, path::Path};
#[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]
pub unsafe fn open_ambient_dir(path: &Path) -> io::Result<fs::File> {
open_ambient_dir_impl(path)
}
#[inline]
pub fn open_dir_path(start: &fs::File, path: &Path) -> io::Result<fs::File> {
open(start, path, &dir_path_options())
}