+/**
+ * Remove all the files in a directory recursively leaving the directory
+ * structure in place.
+ * @note dir will not be removed
+ *
+ * @param dir The directory to clear of files.
+ * @param size of removed files in bytes.
+ * @param list of files that were removed.
+ */
+LIBPBD_API int clear_directory (const std::string& dir, size_t* size = 0,
+ std::vector<std::string>* removed_files = 0);
+
+/**
+ * Remove all the contents of a directory recursively.
+ * including the dir itself (`rm -rf $dir`)
+ *
+ * @param dir The directory to remove recursively
+ */
+LIBPBD_API void remove_directory (const std::string& dir);
+
+/**
+ * Create a temporary writable directory in which to create
+ * temporary files. The directory will be created under the
+ * top level "domain" directory.
+ *
+ * For instance tmp_writable_directory ("pbd", "foo") on POSIX
+ * systems may return a path to a new directory something like
+ * to /tmp/pbd/foo-1423
+ *
+ * @param domain The top level directory
+ * @param prefix A prefix to use when creating subdirectory name
+ *
+ * @return new temporary directory
+ */
+LIBPBD_API std::string tmp_writable_directory (const char* domain, const std::string& prefix);
+
+/** If @param path exists, unlink it. If it doesn't exist, create it.
+ *
+ * @return zero if required action was successful, non-zero otherwise.
+ */
+
+LIBPBD_API int toggle_file_existence (std::string const &);
+