pub fn open(mountpoint: &Path, mountopts: &[&OsStr]) -> io::Result<Self> {
        let (pid, mut reader) = exec_fusermount(mountpoint, mountopts)?;

        // Check if the `fusermount` command is started successfully.
        let mut status = 0;
        syscall! { waitpid(pid, &mut status, 0) };
        let status = ExitStatus::from_raw(status);
        if !status.success() {
            return Err(io::Error::new(
                io::ErrorKind::Other,
                format!("fusermount failed with: {}", status),
            ));
        }

        let fd = receive_fd(&mut reader)?;
        set_nonblocking(fd)?;

        // Unmounting is executed when `reader` is dropped and the connection
        // with `fusermount` is closed.
        let _ = reader.into_raw_fd();

        let conn = PollEvented::new(Connection {
            fd,
            mountpoint: Some(mountpoint.into()),
        })?;

        Ok(Self(conn))
    }
/// Establish a connection with the FUSE kernel driver.
Establish a connection with the FUSE kernel driver.
Establish a connection with the FUSE kernel driver .
pub fn open(mountpoint: &Path, mountopts: &[&OsStr]) -> io::Result<Self> {
        let (pid, mut reader) = exec_fusermount(mountpoint, mountopts)?;
        // Check if the `fusermount` command is started successfully.
        let mut status = 0;
        syscall! { waitpid(pid, &mut status, 0) };
        let status = ExitStatus::from_raw(status);
        if !status.success() {
            return Err(io::Error::new(
                io::ErrorKind::Other,
                format!("fusermount failed with: {}", status),
            ));
        }
        let fd = receive_fd(&mut reader)?;
        set_nonblocking(fd)?;
        // Unmounting is executed when `reader` is dropped and the connection
        // with `fusermount` is closed.
        let _ = reader.into_raw_fd();
        let conn = PollEvented::new(Connection {
            fd,
            mountpoint: Some(mountpoint.into()),
        })?;
        Ok(Self(conn))
    }
pub fn open ( mountpoint : & Path , mountopts : & [ & OsStr ] ) -> io :: Result < Self > { let ( pid , mut reader ) = exec_fusermount ( mountpoint , mountopts ) ? ; // Check if the `fusermount` command is started successfully. let mut status = 0 ; syscall ! { waitpid ( pid mut status 0 ) } ; let status = ExitStatus :: from_raw ( status ) ; if ! status . success ( ) { return Err ( io :: Error :: new ( io :: ErrorKind :: Other , format ! ( " " status ) , ) ) ; } let fd = receive_fd ( & mut reader ) ? ; set_nonblocking ( fd ) ? ; // Unmounting is executed when `reader` is dropped and the connection // with `fusermount` is closed. let _ = reader . into_raw_fd ( ) ; let conn = PollEvented :: new ( Connection { fd , mountpoint : Some ( mountpoint . into ( ) ) , } ) ? ; Ok ( Self ( conn ) ) }
Establish a connection with the FUSE kernel driver.
Establish a connection with the FUSE kernel driver .
mountpoint
&Path
mountopts
&[&OsStr]
mountpoint
&Path
mountopts
&[&OsStr]