summaryrefslogtreecommitdiff
path: root/platform/osx/dir_access_osx.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/osx/dir_access_osx.mm')
-rw-r--r--platform/osx/dir_access_osx.mm10
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/osx/dir_access_osx.mm b/platform/osx/dir_access_osx.mm
index 7791ba5407..439c6a075f 100644
--- a/platform/osx/dir_access_osx.mm
+++ b/platform/osx/dir_access_osx.mm
@@ -68,4 +68,14 @@ String DirAccessOSX::get_drive(int p_drive) {
return volname;
}
+bool DirAccessOSX::is_hidden(const String &p_name) {
+ String f = get_current_dir().plus_file(p_name);
+ NSURL *url = [NSURL fileURLWithPath:@(f.utf8().get_data())];
+ NSNumber *hidden = nil;
+ if (![url getResourceValue:&hidden forKey:NSURLIsHiddenKey error:nil]) {
+ return DirAccessUnix::is_hidden(p_name);
+ }
+ return [hidden boolValue];
+}
+
#endif //posix_enabled