hedgewars/getdocumentpath.m
author nemo
Fri, 20 Nov 2009 22:02:49 +0000
changeset 2632 0c1d3c12ded9
parent 2630 079ef82eac75
child 2671 7e0f88013fe8
permissions -rw-r--r--
revert r2363's ruining the joke

#import <UIKit/UIKit.h>

const char* get_documents_path() {
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex: 0];
    const char* path = [documentsDirectory UTF8String];
    return path;
}