int cmp_nocase (const std::string& s, const std::string& s2);
-int tokenize_fullpath (std::string fullpath, std::string& path, std::string& name);
-
int touch_file(Glib::ustring path);
Glib::ustring path_expand (Glib::ustring);
return (s2.size() == s.size()) ? 0 : (s.size() < s2.size()) ? -1 : 1;
}
-int
-tokenize_fullpath (string fullpath, string& path, string& name)
-{
- string::size_type m = fullpath.find_last_of("/");
-
- if (m == string::npos) {
- path = fullpath;
- name = fullpath;
- return 1;
- }
-
- // does it look like just a directory?
- if (m == fullpath.length()-1) {
- return -1;
- }
- path = fullpath.substr(0, m+1);
-
- string::size_type n = fullpath.find(".ardour", m);
- // no .ardour?
- if (n == string::npos) {
- return -1;
- }
- name = fullpath.substr(m+1, n - m - 1);
- return 1;
-}
-
int
touch_file (ustring path)
{