mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
12 lines
358 B
Mathematica
12 lines
358 B
Mathematica
|
|
#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;
|
||
|
|
}
|