| 1823 | } |
| 1824 | |
| 1825 | Vector<String> EditorSettings::get_script_templates(const String &p_extension, const String &p_custom_path) { |
| 1826 | Vector<String> templates; |
| 1827 | String template_dir = EditorPaths::get_singleton()->get_script_templates_dir(); |
| 1828 | if (!p_custom_path.is_empty()) { |
| 1829 | template_dir = p_custom_path; |
| 1830 | } |
| 1831 | Ref<DirAccess> d = DirAccess::open(template_dir); |
| 1832 | if (d.is_valid()) { |
| 1833 | d->list_dir_begin(); |
| 1834 | String file = d->get_next(); |
| 1835 | while (!file.is_empty()) { |
| 1836 | if (file.get_extension() == p_extension) { |
| 1837 | templates.push_back(file.get_basename()); |
| 1838 | } |
| 1839 | file = d->get_next(); |
| 1840 | } |
| 1841 | d->list_dir_end(); |
| 1842 | } |
| 1843 | return templates; |
| 1844 | } |
| 1845 | |
| 1846 | String EditorSettings::get_editor_layouts_config() const { |
| 1847 | return EditorPaths::get_singleton()->get_config_dir().path_join("editor_layouts.cfg"); |
nothing calls this directly
no test coverage detected