From 1d3594cc9b480914103eba1a81d2b3f93920c060 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Sat, 23 Jun 2012 05:08:01 +0000 Subject: [PATCH] Add docs for PBD::sys::equivalent_paths git-svn-id: svn://localhost/ardour2/branches/3.0@12858 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/pbd/filesystem.cc | 1 - libs/pbd/pbd/filesystem.h | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libs/pbd/filesystem.cc b/libs/pbd/filesystem.cc index 244acefe43..09579cf3cc 100644 --- a/libs/pbd/filesystem.cc +++ b/libs/pbd/filesystem.cc @@ -219,7 +219,6 @@ get_absolute_path (const path & p) return f->get_path (); } -/** @return true if a and b have the same inode */ bool equivalent_paths (const std::string& a, const std::string& b) { diff --git a/libs/pbd/pbd/filesystem.h b/libs/pbd/pbd/filesystem.h index c347f3cc42..68fa310930 100644 --- a/libs/pbd/pbd/filesystem.h +++ b/libs/pbd/pbd/filesystem.h @@ -192,7 +192,14 @@ path get_absolute_path (const path &); bool path_is_within (const path &, path); -bool equivalent_paths (const std::string &, const 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