summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd/file_utils.h
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2012-06-23 05:08:14 +0000
committerTim Mayberry <mojofunk@gmail.com>2012-06-23 05:08:14 +0000
commite26e59b00634d5a66f39e40dea71d56a8dea0f2a (patch)
tree2fa3c913ba58d1189fb97d6057508e2566631475 /libs/pbd/pbd/file_utils.h
parent6aee53710916320742370354c0867004166c6dab (diff)
Move three file utility functions from pbd/filesystem.h to pbd/file_utils.h
git-svn-id: svn://localhost/ardour2/branches/3.0@12863 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/pbd/file_utils.h')
-rw-r--r--libs/pbd/pbd/file_utils.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/libs/pbd/pbd/file_utils.h b/libs/pbd/pbd/file_utils.h
index 475ddb9828..184e644bba 100644
--- a/libs/pbd/pbd/file_utils.h
+++ b/libs/pbd/pbd/file_utils.h
@@ -105,6 +105,28 @@ bool copy_file(const std::string & from_path, const std::string & to_path);
*/
void copy_files(const std::string & from_path, const std::string & to_dir);
+/**
+ * Take a (possibly) relative path and make it absolute
+ * @return An absolute path
+ */
+std::string get_absolute_path (const std::string &);
+
+/**
+ * Find out if `needle' is a file or directory within the
+ * directory `haystack'.
+ * @return true if it is.
+ */
+bool path_is_within (const std::string &, std::string);
+
+/**
+ * @return true if p1 and p2 both resolve to the same file
+ * @param p1 a file path.
+ * @param p2 a file path.
+ *
+ * Uses g_stat to check for identical st_dev and st_ino values.
+ */
+bool equivalent_paths (const std::string &p1, const std::string &p2);
+
} // namespace PBD
#endif