X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fpbd%2Fpbd%2Ffilesystem.h;h=540efe35510de336323c6fc60faa17219d09e422;hb=7a6e86c9f9bef8db74b755db659794c4a859f36d;hp=f09c400f2ee319305d799e02dd0482edcd361d16;hpb=6aee53710916320742370354c0867004166c6dab;p=ardour.git diff --git a/libs/pbd/pbd/filesystem.h b/libs/pbd/pbd/filesystem.h index f09c400f2e..540efe3551 100644 --- a/libs/pbd/pbd/filesystem.h +++ b/libs/pbd/pbd/filesystem.h @@ -90,13 +90,6 @@ public: */ std::string leaf () const; - /** - * @returns the directory component of a path without any trailing - * path separator or an empty string if the path has no directory - * component(branch path). - */ - path branch_path () const; - private: std::string m_path; @@ -119,10 +112,6 @@ inline path operator/ (const path& lhs, const path& rhs) /// @return true if path at p exists bool exists(const path & p); - -/// @return true if path at p exists and is writable, false otherwise -bool exists_and_writable(const path & p); - /// @return true if path at p is a directory. bool is_directory(const path & p); @@ -152,64 +141,6 @@ 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); - -/** - * Renames from_path to to_path as if by the glib function g_rename. - */ -void rename (const path& from_path, const path& to_path); - -/** - * @return The substring of the filename component of the path, starting - * at the beginning of the filename up to but not including the last dot. - * - * boost::filesystem::path::basename differs from g_path_get_basename and - * ::basename and most other forms of basename in that it removes the - * extension from the filename if the filename has one. - */ -std::string basename (const path& p); - -/** - * @return If the filename contains a dot, return a substring of the - * filename starting the rightmost dot to the end of the string, otherwise - * an empty string. - * - * @param p a file path. - */ -std::string extension (const path& p); - -/** - * 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 sys } // namespace PBD