[][src]Function libfuse_sys::fuse_lowlevel::fuse_add_direntry

pub unsafe extern "C" fn fuse_add_direntry(
    req: fuse_req_t,
    buf: *mut c_char,
    bufsize: usize,
    name: *const c_char,
    stbuf: *const stat,
    off: off_t
) -> usize

Add a directory entry to the buffer

Buffer needs to be large enough to hold the entry. If it's not, then the entry is not filled in but the size of the entry is still returned. The caller can check this by comparing the bufsize parameter with the returned entry size. If the entry size is larger than the buffer size, the operation failed.

From the 'stbuf' argument the st_ino field and bits 12-15 of the st_mode field are used. The other fields are ignored.

Note: offsets do not necessarily represent physical offsets, and could be any marker, that enables the implementation to find a specific point in the directory stream.

@param req request handle @param buf the point where the new entry will be added to the buffer @param bufsize remaining size of the buffer @param name the name of the entry @param stbuf the file attributes @param off the offset of the next entry @return the space needed for the entry