mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Add file and dir temporary utilities
Co-authored by @Alex2782 for the Android bindings. Many thanks to the reviewers also. Co-authored-by: Alex <alex.hart.278@gmail.com>
This commit is contained in:
@@ -577,6 +577,11 @@ String OS::get_cache_dir() const {
|
||||
return ::OS::get_singleton()->get_cache_path();
|
||||
}
|
||||
|
||||
String OS::get_temp_dir() const {
|
||||
// Exposed as `get_temp_dir()` instead of `get_temp_path()` for consistency with other exposed OS methods.
|
||||
return ::OS::get_singleton()->get_temp_path();
|
||||
}
|
||||
|
||||
bool OS::is_debug_build() const {
|
||||
#ifdef DEBUG_ENABLED
|
||||
return true;
|
||||
@@ -705,6 +710,7 @@ void OS::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_config_dir"), &OS::get_config_dir);
|
||||
ClassDB::bind_method(D_METHOD("get_data_dir"), &OS::get_data_dir);
|
||||
ClassDB::bind_method(D_METHOD("get_cache_dir"), &OS::get_cache_dir);
|
||||
ClassDB::bind_method(D_METHOD("get_temp_dir"), &OS::get_temp_dir);
|
||||
ClassDB::bind_method(D_METHOD("get_unique_id"), &OS::get_unique_id);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_keycode_string", "code"), &OS::get_keycode_string);
|
||||
|
||||
Reference in New Issue
Block a user