mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-09-26 23:54:56 +00:00
13 lines
358 B
Mathematica
13 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;
|
||
|
}
|