1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Implement get_filesystem_type on macOS and Linux.

This commit is contained in:
Pāvels Nadtočajevs
2025-05-14 11:35:25 +03:00
parent 45fc515ae3
commit d609cf62a0
7 changed files with 184 additions and 2 deletions

View File

@@ -34,11 +34,20 @@
#include "core/config/project_settings.h"
#include <sys/mount.h>
#include <cerrno>
#import <AppKit/NSWorkspace.h>
#import <Foundation/Foundation.h>
String DirAccessMacOS::get_filesystem_type() const {
struct statfs fs;
if (statfs(current_dir.utf8().get_data(), &fs) != 0) {
return "";
}
return String::utf8(fs.f_fstypename).to_upper();
}
String DirAccessMacOS::fix_unicode_name(const char *p_name) const {
String fname;
if (p_name != nullptr) {