summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd/filesystem.h
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2007-09-04 04:48:04 +0000
committerTim Mayberry <mojofunk@gmail.com>2007-09-04 04:48:04 +0000
commit29842063e312e804e748f2160a90ccc35be63311 (patch)
tree05588bb8cd940777bb73f36fa0669d66e2dc6b5f /libs/pbd/pbd/filesystem.h
parentf9c202dba050d3975f977bb08ceaf0b1b39fa499 (diff)
Add function PBD::sys::remove as a wrapper to g_unlink
API is intended to be indentical(apart from the string type) to boost::filesystem::remove git-svn-id: svn://localhost/ardour2/trunk@2372 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/pbd/filesystem.h')
-rw-r--r--libs/pbd/pbd/filesystem.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/pbd/pbd/filesystem.h b/libs/pbd/pbd/filesystem.h
index 8d4bf8dea9..7eca8a7ed3 100644
--- a/libs/pbd/pbd/filesystem.h
+++ b/libs/pbd/pbd/filesystem.h
@@ -94,6 +94,18 @@ bool create_directory(const path & p);
*/
bool create_directories(const path & p);
+/**
+ * Attempt to delete the file at path p as if by the glib function
+ * g_unlink.
+ *
+ * @return true if file existed prior to removing it, false if file
+ * at p did not exist.
+ *
+ * @throw filesystem_error if removing the file failed for any other
+ * reason other than the file did not exist.
+ */
+bool remove(const path & p);
+
string basename (const path& p);
} // namespace sys