Implement and expose OS::shell_show_in_file_manager()

This commit is contained in:
Daylily-Zeleen
2022-12-07 11:33:35 +08:00
parent 6f1a52b017
commit b12ced0a26
12 changed files with 87 additions and 15 deletions

View File

@ -281,6 +281,15 @@ Error OS::shell_open(String p_uri) {
return ERR_UNAVAILABLE;
}
Error OS::shell_show_in_file_manager(String p_path, bool p_open_folder) {
if (!p_path.begins_with("file://")) {
p_path = String("file://") + p_path;
}
if (!p_path.ends_with("/")) {
p_path = p_path.get_base_dir();
}
return shell_open(p_path);
}
// implement these with the canvas?
uint64_t OS::get_static_memory_usage() const {