summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2012-06-23 05:09:11 +0000
committerTim Mayberry <mojofunk@gmail.com>2012-06-23 05:09:11 +0000
commit7a881ef67aa85a1f7732754db2b9103ebf1f0eb7 (patch)
treee5e48c9e707598257b3b546fd430ac4fa645fd48
parent6b62959ba0e48a798e0fdfcc83078c4a9e60d8b6 (diff)
Remove PBD::sys::is_directory and use Glib equivalent
git-svn-id: svn://localhost/ardour2/branches/3.0@12887 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/pbd/filesystem.cc10
-rw-r--r--libs/pbd/pbd/filesystem.h3
2 files changed, 2 insertions, 11 deletions
diff --git a/libs/pbd/filesystem.cc b/libs/pbd/filesystem.cc
index 7c76e5f053..558fc01227 100644
--- a/libs/pbd/filesystem.cc
+++ b/libs/pbd/filesystem.cc
@@ -64,15 +64,9 @@ path::operator/=(const char* rhs)
}
bool
-is_directory (const path & p)
-{
- return Glib::file_test (p.to_string(), Glib::FILE_TEST_IS_DIR);
-}
-
-bool
create_directory(const path & p)
{
- if(is_directory(p)) return false;
+ if (Glib::file_test (p.to_string(), Glib::FILE_TEST_IS_DIR)) return false;
int error = g_mkdir (p.to_string().c_str(), S_IRWXU|S_IRWXG|S_IRWXO);
@@ -86,7 +80,7 @@ create_directory(const path & p)
bool
create_directories(const path & p)
{
- if(is_directory(p)) return false;
+ if (Glib::file_test (p.to_string(), Glib::FILE_TEST_IS_DIR)) return false;
int error = g_mkdir_with_parents (p.to_string().c_str(), S_IRWXU|S_IRWXG|S_IRWXO);
diff --git a/libs/pbd/pbd/filesystem.h b/libs/pbd/pbd/filesystem.h
index 3a3c09e258..7985940452 100644
--- a/libs/pbd/pbd/filesystem.h
+++ b/libs/pbd/pbd/filesystem.h
@@ -103,9 +103,6 @@ public:
inline path operator/ (const path& lhs, const path& rhs)
{ return path(lhs) /= rhs; }
-/// @return true if path at p is a directory.
-bool is_directory(const path & p);
-
/**
* Attempt to create a directory at p as if by the glib function g_mkdir
* with a second argument of S_IRWXU|S_IRWXG|S_IRWXO