mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-18 02:13:08 +09:00
12 lines
358 B
Objective-C
12 lines
358 B
Objective-C
#import <Foundation/Foundation.h>
|
|
|
|
bool GetDocumentsDirectory(char* dir)
|
|
{
|
|
NSSearchPathDirectory directory = NSDocumentDirectory;
|
|
NSArray* paths = NSSearchPathForDirectoriesInDomains(directory, NSUserDomainMask, YES);
|
|
if ([paths count] == 0) {
|
|
return false;
|
|
}
|
|
strcpy(dir, [[paths objectAtIndex:0] UTF8String]);
|
|
return true;
|
|
}
|