add missing files
[ardour.git] / libs / pbd / pbd / file_utils.h
index 475ddb982855d00d4a8f126be6d00a1adae6a644..72696f6abdf40484d044e4235f15c4f43d960f58 100644 (file)
@@ -105,6 +105,31 @@ 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);
+
+/// @return true if path at p exists and is writable, false otherwise
+bool exists_and_writable(const std::string & p);
+
 } // namespace PBD
 
 #endif