mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Implement get_filesystem_type on macOS and Linux.
This commit is contained in:
parent
45fc515ae3
commit
d609cf62a0
7 changed files with 184 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue