annotate src/sys/osx/filesystem.mm @ 9:5c0397762b53

INCOMPLETE: megacommit :)
author Paper <mrpapersonic@gmail.com>
date Sun, 10 Sep 2023 03:59:16 -0400
parents 51ae25154b70
children cde8f67a7c7d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
1 #include <Cocoa/Cocoa.h>
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
2 #include <string>
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
3
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
4 namespace osx {
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
6 std::string GetApplicationSupportDirectory() {
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 5
diff changeset
7 NSArray* strings = NSSearchPathForDirectoriesInDomains(
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 5
diff changeset
8 NSApplicationSupportDirectory, NSUserDomainMask, true);
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
9 return std::string([[strings objectAtIndex:0] UTF8String]);
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
10 }
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
11
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 5
diff changeset
12 } // namespace osx