summaryrefslogtreecommitdiff
path: root/libs/pbd/filesystem.cc
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2012-06-23 05:08:19 +0000
committerTim Mayberry <mojofunk@gmail.com>2012-06-23 05:08:19 +0000
commit6b1659a29bb9b5c4a31cb0aec371842df0585034 (patch)
treed9b5d003963f42b6c99d18b499c74870e6b92344 /libs/pbd/filesystem.cc
parent878acbee14849b763d8c6eb035a151b444580158 (diff)
Move file utility function into pbd/file_utils.h and into PBD namespace
git-svn-id: svn://localhost/ardour2/branches/3.0@12865 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/filesystem.cc')
-rw-r--r--libs/pbd/filesystem.cc31
1 files changed, 0 insertions, 31 deletions
diff --git a/libs/pbd/filesystem.cc b/libs/pbd/filesystem.cc
index 105af6ea32..a154ed8b8e 100644
--- a/libs/pbd/filesystem.cc
+++ b/libs/pbd/filesystem.cc
@@ -94,37 +94,6 @@ exists (const path & p)
}
bool
-exists_and_writable (const std::string & p)
-{
- /* writable() really reflects the whole folder, but if for any
- reason the session state file can't be written to, still
- make us unwritable.
- */
-
- struct stat statbuf;
-
- if (g_stat (p.c_str(), &statbuf) != 0) {
- /* doesn't exist - not writable */
- return false;
- } else {
- if (!(statbuf.st_mode & S_IWUSR)) {
- /* exists and is not writable */
- return false;
- }
- /* filesystem may be mounted read-only, so even though file
- * permissions permit access, the mount status does not.
- * access(2) seems like the best test for this.
- */
- if (g_access (p.to_string().c_str(), W_OK) != 0) {
- return false;
- }
- }
-
- return true;
-}
-
-
-bool
is_directory (const path & p)
{
return Glib::file_test (p.to_string(), Glib::FILE_TEST_IS_DIR);