Add 'libs/pbd/pbd/pthread_utils.h' to our pbd project (msvc)
[ardour.git] / libs / pbd / file_utils.cc
index cfffd98592d625d45ee46b8beb0bc6072279acd4..0877ceacbcbb432cc82f5880f14c4d36979a19cf 100644 (file)
@@ -336,6 +336,16 @@ get_absolute_path (const std::string & p)
        return Glib::build_filename (Glib::get_current_dir(), p);
 }
 
+std::string
+get_suffix (const std::string & p)
+{
+       string::size_type period = p.find_last_of ('.');
+       if (period == string::npos || period == p.length() - 1) {
+               return string();
+       }
+       return p.substr (period+1);
+}
+
 bool
 equivalent_paths (const std::string& a, const std::string& b)
 {
@@ -399,7 +409,7 @@ remove_directory_internal (const string& dir, size_t* size, vector<string>* path
                            bool just_remove_files)
 {
        vector<string> tmp_paths;
-       struct stat statbuf;
+       GStatBuf statbuf;
        int ret = 0;
 
        get_paths (tmp_paths, dir, just_remove_files, true);