hedgewars/getdocumentpath.m
author nemo
Sat, 05 Dec 2009 17:57:09 +0000
changeset 2654 622d89be57b6
parent 2630 079ef82eac75
child 2671 7e0f88013fe8
permissions -rw-r--r--
Can't trim this unless another value is used. needed for joins.

#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;
}