diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-04-01 21:07:35 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-04-01 21:07:35 +0000 |
commit | 18fce98ceef049fe53bdb48c4fbfaa8bb833f6e6 (patch) | |
tree | 66a737ddcd9a1f7a42642b5a377b00340e26f82e /include | |
parent | 7ff715cf59da48707ae776b235beb25175ff632c (diff) | |
download | android_external_fuse-18fce98ceef049fe53bdb48c4fbfaa8bb833f6e6.tar.gz android_external_fuse-18fce98ceef049fe53bdb48c4fbfaa8bb833f6e6.tar.bz2 android_external_fuse-18fce98ceef049fe53bdb48c4fbfaa8bb833f6e6.zip |
fix
Diffstat (limited to 'include')
-rw-r--r-- | include/fuse.h | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/include/fuse.h b/include/fuse.h index 5e5cd45..35ec49f 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -62,6 +62,19 @@ typedef struct fuse_dirhandle *fuse_dirh_t; typedef int (*fuse_dirfil_t) (fuse_dirh_t h, const char *name, int type, ino_t ino); +/** Function to add an entry in a readdir() operation + * + * @param buf the buffer passed to the readdir() operation + * @param name the file name of the directory entry + * @param type the file type (0 if unknown) see <dirent.h> + * @param ino the inode number, ignored if "use_ino" mount option is + * not specified + * @param off offset of the next entry + * @return 0 on success, 1 if buffer is full + */ +typedef int (*fuse_dirfil5_t) (void *buf, const char *name, int type, + ino_t ino, off_t off); + /** Information about open files */ struct fuse_file_info { /** Open flags. Available in open() and release() */ @@ -85,9 +98,10 @@ struct fuse_file_info { * negated error value (-errno) directly. * * All methods are optional, but some are essential for a useful - * filesystem (e.g. getattr). Flush, release, fsync, init and destroy - * are special purpose methods, without which a full featured - * filesystem can still be implemented. + * filesystem (e.g. getattr). Flush, release, fsync, opendir, + * readdir, releasedir, fsyncdir, init and destroy are special purpose + * methods, without which a full featured filesystem can still be + * implemented. */ struct fuse_operations { /** Get file attributes. @@ -243,18 +257,27 @@ struct fuse_operations { int (*removexattr) (const char *, const char *); /** Open direcory - * + * * This method should check if the open operation is permitted for - * this directory. The fuse_file_info parameter is currently - * unused. + * this directory */ int (*opendir) (const char *, struct fuse_file_info *); + /** Read directory + * + * This is an alternative inteface to getdir(), and if defined + * getdir() will not be called + */ + int (*readdir) (const char *, void *, fuse_dirfil5_t, off_t, + struct fuse_file_info *); + + /** Release directory */ + int (*releasedir) (const char *, struct fuse_file_info *); + /** Synchronize directory contents * * If the datasync parameter is non-zero, then only the user data - * should be flushed, not the meta data. The fuse_file_info - * parameter is currently unused + * should be flushed, not the meta data */ int (*fsyncdir) (const char *, int, struct fuse_file_info *); @@ -269,7 +292,7 @@ struct fuse_operations { /** * Clean up filesystem - * + * * Called on filesystem exit. */ void (*destroy) (void *); |