summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd/file_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/pbd/pbd/file_utils.h')
-rw-r--r--libs/pbd/pbd/file_utils.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/pbd/pbd/file_utils.h b/libs/pbd/pbd/file_utils.h
index b266ad153f..7a9cb68318 100644
--- a/libs/pbd/pbd/file_utils.h
+++ b/libs/pbd/pbd/file_utils.h
@@ -232,6 +232,22 @@ LIBPBD_API int clear_directory (const std::string& dir, size_t* size = 0,
*/
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);
+
} // namespace PBD
#endif