more vst parameter related stuff
[ardour.git] / libs / pbd / pbd / file_utils.h
index b303936fab8240e7559e56d16f279ab40fe12f1f..72696f6abdf40484d044e4235f15c4f43d960f58 100644 (file)
@@ -90,7 +90,46 @@ bool
 find_file_in_search_path (const SearchPath& search_path,
                           const std::string& filename,
                           std::string& result);
-                       
+
+/**
+ * Attempt to copy the contents of the file from_path to a new file
+ * at path to_path. If to_path exists it is overwritten.
+ *
+ * @return true if file was successfully copied
+ */
+bool copy_file(const std::string & from_path, const std::string & to_path);
+
+/**
+ * Attempt to copy all regular files from from_path to a new directory.
+ * This method does not recurse.
+ */
+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