3 #include <pbd/filesystem.h>
5 #include <ardour/template_utils.h>
6 #include <ardour/directory_names.h>
7 #include <ardour/filesystem_paths.h>
12 system_template_directory ()
14 SearchPath spath(system_data_search_path());
15 spath.add_subdirectory_to_paths(templates_dir_name);
17 // just return the first directory in the search path that exists
18 SearchPath::const_iterator i = std::find_if(spath.begin(), spath.end(), sys::exists);
20 if (i == spath.end()) return sys::path();
26 user_template_directory ()
28 sys::path p(user_config_directory());
29 p /= templates_dir_name;