summaryrefslogtreecommitdiff
path: root/libs/pbd/file_utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/pbd/file_utils.cc')
-rw-r--r--libs/pbd/file_utils.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/pbd/file_utils.cc b/libs/pbd/file_utils.cc
index 25d675932b..a83d116d02 100644
--- a/libs/pbd/file_utils.cc
+++ b/libs/pbd/file_utils.cc
@@ -343,6 +343,17 @@ copy_recurse(const std::string & from_path, const std::string & to_dir)
}
}
+bool
+touch_file (const std::string& path)
+{
+ int fd = g_open (path.c_str(), O_RDWR|O_CREAT, 0660);
+ if (fd >= 0) {
+ close (fd);
+ return true;
+ }
+ return false;
+}
+
std::string
get_absolute_path (const std::string & p)
{