Merge pull request #98397 from adamscott/add-tmp-support

Add temp utilities (alias `OS::get_temp_dir()`, `FileAccess::create_temp()`, and `DirAccess::create_temp()`)
This commit is contained in:
Thaddeus Crews 2024-12-03 14:40:59 -06:00
commit 156bc92282
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84
26 changed files with 331 additions and 7 deletions

View file

@ -677,6 +677,19 @@ String OS_Android::get_cache_path() const {
return ".";
}
String OS_Android::get_temp_path() const {
if (!temp_dir_cache.is_empty()) {
return temp_dir_cache;
}
String temp_dir = godot_io_java->get_temp_dir();
if (!temp_dir.is_empty()) {
temp_dir_cache = _remove_symlink(temp_dir);
return temp_dir_cache;
}
return ".";
}
String OS_Android::get_unique_id() const {
String unique_id = godot_io_java->get_unique_id();
if (!unique_id.is_empty()) {