57 if (!Glib::file_test (str, Glib::FILE_TEST_IS_DIR)) {
77 return Glib::build_filename (dir, Glib::path_get_basename(dir) +
template_suffix);
84 vector<string> templates;
88 if (templates.empty()) {
95 for (vector<string>::iterator i = templates.begin(); i != templates.end(); ++i) {
100 if (!tree.
read (file.c_str())) {
109 template_names.push_back (rti);
116 vector<string> templates;
120 if (templates.empty()) {
124 for (vector<string>::iterator i = templates.begin(); i != templates.end(); ++i) {
125 string fullpath = *i;
129 if (!tree.
read (fullpath.c_str())) {
137 rti.
name = IO::name_from_state (*root->
children().front());
140 template_names.push_back (rti);
void find_paths_matching_filter(vector< string > &result, const Searchpath &paths, bool(*filter)(const string &, void *), void *arg, bool pass_fullpath, bool return_fullpath, bool recurse)
static bool route_template_filter(const string &str, void *)
string session_template_dir_to_file(string const &dir)
LIBARDOUR_API const char *const route_templates_dir_name
const XMLNodeList & children(const std::string &str=std::string()) const
LIBARDOUR_API PBD::Searchpath template_search_path()
LIBARDOUR_API std::string user_config_directory(int version=-1)
LIBARDOUR_API std::string user_route_template_directory()
LIBARDOUR_API std::string user_template_directory()
void find_session_templates(vector< TemplateInfo > &template_names)
LIBARDOUR_API const char *const templates_dir_name
LIBARDOUR_API const char *const template_suffix
static bool template_filter(const string &str, void *)
LIBPBD_API Glib::ustring basename_nosuffix(Glib::ustring)
void find_route_templates(vector< TemplateInfo > &template_names)
LIBPBD_TEMPLATE_MEMBER_API const std::string to_string() const
void find_files_matching_filter(vector< string > &result, const Searchpath &paths, bool(*filter)(const string &, void *), void *arg, bool pass_fullpath, bool return_fullpath, bool recurse)
LIBARDOUR_API PBD::Searchpath route_template_search_path()