hedgewars/getdocumentpath.m
author nemo
Thu, 07 Jan 2010 22:59:14 +0000
changeset 2684 04c086d8d9d4
parent 2671 7e0f88013fe8
permissions -rw-r--r--
Hopefully this is the last error. Fix the if test, offset by -1 due to how the output appears to be handled.

#import <UIKit/UIKit.h>

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