/**************************************************************************/1/* editor_paths.h */2/**************************************************************************/3/* This file is part of: */4/* GODOT ENGINE */5/* https://godotengine.org */6/**************************************************************************/7/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */8/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */9/* */10/* Permission is hereby granted, free of charge, to any person obtaining */11/* a copy of this software and associated documentation files (the */12/* "Software"), to deal in the Software without restriction, including */13/* without limitation the rights to use, copy, modify, merge, publish, */14/* distribute, sublicense, and/or sell copies of the Software, and to */15/* permit persons to whom the Software is furnished to do so, subject to */16/* the following conditions: */17/* */18/* The above copyright notice and this permission notice shall be */19/* included in all copies or substantial portions of the Software. */20/* */21/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */22/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */23/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */24/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */25/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */26/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */27/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */28/**************************************************************************/2930#pragma once3132#include "core/object/class_db.h"33#include "core/object/object.h"34#include "core/string/ustring.h"3536class EditorPaths : public Object {37GDCLASS(EditorPaths, Object)3839bool paths_valid = false; // If any of the paths can't be created, this is false.40String data_dir; // Editor data (templates, shader cache, etc.).41String config_dir; // Editor config (settings, profiles, themes, etc.).42String cache_dir; // Editor cache (thumbnails, tmp generated files).43String temp_dir; // Editor temporary directory.44String project_data_dir; // Project-specific data (metadata, shader cache, etc.).45bool self_contained = false; // Self-contained means everything goes to `editor_data` dir.46String self_contained_file; // Self-contained file with configuration.47String export_templates_folder = "export_templates";48String text_editor_themes_folder = "text_editor_themes";49String script_templates_folder = "script_templates";50String feature_profiles_folder = "feature_profiles";5152static EditorPaths *singleton;5354protected:55static void _bind_methods();5657public:58bool are_paths_valid() const;5960String get_data_dir() const;61String get_config_dir() const;62String get_cache_dir() const;63String get_temp_dir() const;64String get_project_data_dir() const;65String get_export_templates_dir() const;66String get_debug_keystore_path() const;67String get_project_settings_dir() const;68String get_text_editor_themes_dir() const;69String get_script_templates_dir() const;70String get_project_script_templates_dir() const;71String get_feature_profiles_dir() const;7273bool is_self_contained() const;74String get_self_contained_file() const;7576static EditorPaths *get_singleton() {77return singleton;78}7980static void create();81static void free();8283EditorPaths();84};858687