dope-core 0.15.1

The manifold runtime
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::{fs, io, os::fd, path};

use crate::{backend, platform};

impl platform::Filesystem for backend::Uring {
    fn open_directory(path: &path::Path) -> io::Result<fd::OwnedFd> {
        use std::os::unix::fs::OpenOptionsExt;

        let mut options = fs::OpenOptions::new();
        options.read(true);
        OpenOptionsExt::custom_flags(
            &mut options,
            libc::O_PATH | libc::O_DIRECTORY | libc::O_CLOEXEC,
        );
        let directory = options.open(path)?;
        Ok(directory.into())
    }
}