Logo Search packages:      
Sourcecode: fuse version File versions  Download package

size_t fuse_add_direntry ( fuse_req_t  req,
char *  buf,
size_t  bufsize,
const char *  name,
const struct stat *  stbuf,
off_t  off 

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.

reqrequest handle
bufthe point where the new entry will be added to the buffer
bufsizeremaining size of the buffer
namethe name of the entry
stbufthe file attributes
offthe offset of the next entry
the space needed for the entry

Definition at line 216 of file fuse_lowlevel.c.

References fuse_add_direntry().

Referenced by fuse_add_direntry().

      size_t entsize;

      (void) req;
      entsize = fuse_dirent_size(strlen(name));
      if (entsize <= bufsize && buf)
            fuse_add_dirent(buf, name, stbuf, off);
      return entsize;

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index