hedgewars/getdocumentpath.m
author nemo
Sun, 29 Nov 2009 16:37:12 +0000
changeset 2646 6a1185633872
parent 2630 079ef82eac75
child 2671 7e0f88013fe8
permissions -rw-r--r--
New despeckle by Palewolf that pretty well on-the-fly

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