mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-09 04:39:03 +02:00
--HG-- extra : commitid : 61dAWudgCfV extra : rebase_source : 001849d99264012b6e6965c43af3e2e3ff791f93
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;
|
|
}
|