You've already forked godot
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user