*/
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;
/// @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);
*/
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