pub fn add(&mut self, name: &CStr, attr: &stat, offset: off_t) -> bool {
        // calculate the length of new entry.
        let new_entry_len = unsafe {
            fuse_add_direntry(self.req, ptr::null_mut(), 0, name.as_ptr(), ptr::null(), 0)
        };
        if self.buf.len() < self.pos + new_entry_len {
            return true;
        }

        unsafe {
            fuse_add_direntry(
                self.req,
                self.buf[self.pos..].as_mut_ptr() as *mut c_char,
                self.buf.len() - self.pos,
                name.as_ptr(),
                attr,
                offset,
            );
        }

        self.pos += new_entry_len;

        false
    }
/// Add an directory entry to the send buffer.
///
/// If the size of entry to be added is larger than the send buffer,
/// no entry is added and a `true` will be returned.
Add an directory entry to the send buffer.
If the size of entry to be added is larger than the send buffer,
no entry is added and a `true` will be returned.
Add an directory entry to the send buffer . If the size of entry to be added is larger than the send buffer no entry is added and a ` true ` will be returned .
pub fn add(&mut self, name: &CStr, attr: &stat, offset: off_t) -> bool {
        // calculate the length of new entry.
        let new_entry_len = unsafe {
            fuse_add_direntry(self.req, ptr::null_mut(), 0, name.as_ptr(), ptr::null(), 0)
        };
        if self.buf.len() < self.pos + new_entry_len {
            return true;
        }
        unsafe {
            fuse_add_direntry(
                self.req,
                self.buf[self.pos..].as_mut_ptr() as *mut c_char,
                self.buf.len() - self.pos,
                name.as_ptr(),
                attr,
                offset,
            );
        }
        self.pos += new_entry_len;
        false
    }
pub fn add ( & mut self , name : & CStr , attr : & stat , offset : off_t ) -> bool { // calculate the length of new entry. let new_entry_len = unsafe { fuse_add_direntry ( self . req , ptr :: null_mut ( ) , 0 , name . as_ptr ( ) , ptr :: null ( ) , 0 ) } ; if self . buf . len ( ) < self . pos + new_entry_len { return true ; } unsafe { fuse_add_direntry ( self . req , self . buf [ self . pos .. ] . as_mut_ptr ( ) as * mut c_char , self . buf . len ( ) - self . pos , name . as_ptr ( ) , attr , offset , ) ; } self . pos += new_entry_len ; false }
Add an directory entry to the send buffer.
Add an directory entry to the send buffer .
&mut self
name
&CStr
attr
&stat
offset
off_t