hedgewars/getdocumentpath.m
author unc0rr
Sun, 29 Nov 2009 18:30:21 +0000
changeset 2648 415a75d45693
parent 2630 079ef82eac75
child 2671 7e0f88013fe8
permissions -rw-r--r--
Get rid of stupid ToggleLongInt and ToggleString functions
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2630
079ef82eac75 revamped file access and debug display
koda
parents:
diff changeset
     1
#import <UIKit/UIKit.h>
079ef82eac75 revamped file access and debug display
koda
parents:
diff changeset
     2
079ef82eac75 revamped file access and debug display
koda
parents:
diff changeset
     3
const char* get_documents_path() {
079ef82eac75 revamped file access and debug display
koda
parents:
diff changeset
     4
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
079ef82eac75 revamped file access and debug display
koda
parents:
diff changeset
     5
    NSString *documentsDirectory = [paths objectAtIndex: 0];
079ef82eac75 revamped file access and debug display
koda
parents:
diff changeset
     6
    const char* path = [documentsDirectory UTF8String];
079ef82eac75 revamped file access and debug display
koda
parents:
diff changeset
     7
    return path;
079ef82eac75 revamped file access and debug display
koda
parents:
diff changeset
     8
}