* `fuse_main()` / `fuse_remove_signal_handlers()`: do not reset
`SIGPIPE` handler to `SIG_DFL` it was not set by us.
+* Documented the `RENAME_EXCHANGE` and `RENAME_NOREPLACE` flags that
+ may be passed to the `rename` handler of both the high- and
+ low-level API. Filesystem authors are strongly encouraged to check
+ that these flags are handled correctly.
libfuse 3.0.2 (2017-05-24)
==========================
/** Create a symbolic link */
int (*symlink) (const char *, const char *);
- /** Rename a file */
- int (*rename) (const char *, const char *, unsigned int);
+ /** Rename a file
+ *
+ * *flags* may be `RENAME_EXCHANGE` or `RENAME_NOREPLACE`. If
+ * RENAME_NOREPLACE is specified, the filesystem must not
+ * overwrite *newname* if it exists and return an error
+ * instead. If `RENAME_EXCHANGE` is specified, the filesystem
+ * must atomically exchange the two files, i.e. both must
+ * exist and neither may be deleted.
+ */
+ int (*rename) (const char *, const char *, unsigned int flags);
/** Create a hard link to a file */
int (*link) (const char *, const char *);
* future bmap requests will fail with EINVAL without being
* send to the filesystem process.
*
+ * *flags* may be `RENAME_EXCHANGE` or `RENAME_NOREPLACE`. If
+ * RENAME_NOREPLACE is specified, the filesystem must not
+ * overwrite *newname* if it exists and return an error
+ * instead. If `RENAME_EXCHANGE` is specified, the filesystem
+ * must atomically exchange the two files, i.e. both must
+ * exist and neither may be deleted.
+ *
* Valid replies:
* fuse_reply_err
*