From c44917aed73ab17675f2df59a16778191393c9be Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Sat, 23 Jun 2012 05:09:22 +0000 Subject: [PATCH] Remove unused PBD:sys::create_directory/ies functions git-svn-id: svn://localhost/ardour2/branches/3.0@12892 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/pbd/filesystem.cc | 28 ---------------------------- libs/pbd/pbd/filesystem.h | 26 -------------------------- 2 files changed, 54 deletions(-) diff --git a/libs/pbd/filesystem.cc b/libs/pbd/filesystem.cc index 558fc01227..65379c6fb5 100644 --- a/libs/pbd/filesystem.cc +++ b/libs/pbd/filesystem.cc @@ -63,34 +63,6 @@ path::operator/=(const char* rhs) return *this; } -bool -create_directory(const path & p) -{ - 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); - - if(error == -1) - { - throw filesystem_error(g_strerror(errno), errno); - } - return true; -} - -bool -create_directories(const path & p) -{ - 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); - - if(error == -1) - { - throw filesystem_error(g_strerror(errno), errno); - } - return true; -} - } // namespace sys } // namespace PBD diff --git a/libs/pbd/pbd/filesystem.h b/libs/pbd/pbd/filesystem.h index 7985940452..17550807ff 100644 --- a/libs/pbd/pbd/filesystem.h +++ b/libs/pbd/pbd/filesystem.h @@ -103,32 +103,6 @@ public: inline path operator/ (const path& lhs, const path& rhs) { return path(lhs) /= rhs; } -/** - * 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 - * - * @throw filesystem_error if mkdir fails for any other reason other than - * the directory already exists. - * - * @return true If the directory p was created, otherwise false - * - * @post is_directory(p) - */ -bool create_directory(const path & p); - -/** - * Attempt to create a directory at p as if by the glib function - * g_mkdir_with_parents with a second argument of S_IRWXU|S_IRWXG|S_IRWXO - * - * @throw filesystem_error if g_mkdir_with_parents fails for any other - * reason other than the directory already exists. - * - * @return true If the directory at p was created, otherwise false - * - * @post is_directory(p) - */ -bool create_directories(const path & p); - } // namespace sys } // namespace PBD