hedgewars/getdocumentpath.m
author nemo
Thu, 07 Jan 2010 16:12:26 +0000
changeset 2679 b61d25fa6c53
parent 2671 7e0f88013fe8
permissions -rw-r--r--
bit of a short circuit to reduce a few pointless tests on most text strings

#import <UIKit/UIKit.h>

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