Remove unused PBD:sys::create_directory/ies functions
git-svn-id: svn://localhost/ardour2/branches/3.0@12892 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
0d785c8ebd
commit
c44917aed7
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user