tenfourfox/embedding/ios/GeckoEmbed/js/dirs.m

13 lines
358 B
Mathematica
Raw Permalink Normal View History

2017-04-19 07:56:45 +00:00
#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;
}