diff options
Diffstat (limited to 'libs/pbd/pbd/file_utils.h')
-rw-r--r-- | libs/pbd/pbd/file_utils.h | 22 |
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 |