aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse.h
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-10-26 15:29:06 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2005-10-26 15:29:06 +0000
commitd9079a75b14b73e7953adf4958709b1e5ab3804c (patch)
tree6c20aef91825f2d4d62e18080579be7a1d54f62e /include/fuse.h
parent2c650415ef3e655dbe1c6d39b8fc65c3a6efe998 (diff)
downloadandroid_external_fuse-d9079a75b14b73e7953adf4958709b1e5ab3804c.tar.gz
android_external_fuse-d9079a75b14b73e7953adf4958709b1e5ab3804c.tar.bz2
android_external_fuse-d9079a75b14b73e7953adf4958709b1e5ab3804c.zip
atomic open+create added
Diffstat (limited to 'include/fuse.h')
-rw-r--r--include/fuse.h28
1 files changed, 22 insertions, 6 deletions
diff --git a/include/fuse.h b/include/fuse.h
index 4a099bc..290e9d3 100644
--- a/include/fuse.h
+++ b/include/fuse.h
@@ -63,9 +63,9 @@ typedef int (*fuse_dirfil_t) (fuse_dirh_t h, const char *name, int type,
*
* All methods are optional, but some are essential for a useful
* filesystem (e.g. getattr). Open, flush, release, fsync, opendir,
- * releasedir, fsyncdir, access, init and destroy are special purpose
- * methods, without which a full featured filesystem can still be
- * implemented.
+ * releasedir, fsyncdir, access, create, init and destroy are special
+ * purpose methods, without which a full featured filesystem can still
+ * be implemented.
*/
struct fuse_operations {
/** Get file attributes.
@@ -301,13 +301,29 @@ struct fuse_operations {
/**
* Check file access permissions
*
- * Need not be implemented. This will be called for the access()
- * system call. If the 'default_permissions' mount option is
- * given, this method is not called.
+ * This will be called for the access() system call. If the
+ * 'default_permissions' mount option is given, this method is not
+ * called.
+ *
+ * This method is not called under Linux kernel versions 2.4.x
*
* Introduced in version 2.5
*/
int (*access) (const char *, int);
+
+ /**
+ * Create and open a file
+ *
+ * If the file does not exist, first create it with the specified
+ * mode, and then open it.
+ *
+ * If this method is not implemented or under Linux kernel
+ * versions earlier than 2.6.15, the mknod() and open() methods
+ * will be called instead.
+ *
+ * Introduced in version 2.5
+ */
+ int (*create) (const char *, mode_t, struct fuse_file_info *);
};
/** Extra context that may be needed by some filesystems