hedgewars/getdocumentpath.m
changeset 2671 7e0f88013fe8
parent 2630 079ef82eac75
equal deleted inserted replaced
2670:1b327b7515ed 2671:7e0f88013fe8
     1 #import <UIKit/UIKit.h>
     1 #import <UIKit/UIKit.h>
     2 
     2 
     3 const char* get_documents_path() {
     3 const char* get_documents_path() {
     4     NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
     4     NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
     5     NSString *documentsDirectory = [paths objectAtIndex: 0];
     5     NSString *documentsDirectory = [paths objectAtIndex: 0];
     6     const char* path = [documentsDirectory UTF8String];
     6     return [documentsDirectory UTF8String];
     7     return path;
       
     8 }
     7 }