static string control_protocol_path ();
static string template_path ();
static string template_dir ();
- static void get_template_list (list<string>&);
static string change_audio_path_by_name (string oldpath, string oldname, string newname, bool destructive);
static string change_midi_path_by_name (string oldpath, string oldname, string newname, bool destructive);
}
#endif
-static bool
-template_filter (const string &str, void *arg)
-{
- return (str.length() > strlen(template_suffix) &&
- str.find (template_suffix) == (str.length() - strlen (template_suffix)));
-}
-
-void
-Session::get_template_list (list<string> &template_names)
-{
- vector<string *> *templates;
- PathScanner scanner;
- string path;
-
- path = template_path ();
-
- templates = scanner (path, template_filter, 0, false, true);
-
- vector<string*>::iterator i;
- for (i = templates->begin(); i != templates->end(); ++i) {
- string fullpath = *(*i);
- int start, end;
-
- start = fullpath.find_last_of ('/') + 1;
- if ((end = fullpath.find_last_of ('.')) <0) {
- end = fullpath.length();
- }
-
- template_names.push_back(fullpath.substr(start, (end-start)));
- }
-}
-
static bool
accept_all_non_peak_files (const string& path, void *arg)
{