21 #import <Foundation/Foundation.h>
23 #include <winpr/config.h>
25 #include "shell_ios.h"
27 static NSString *ios_get_directory_for_search_path(NSSearchPathDirectory searchPath)
29 return [NSSearchPathForDirectoriesInDomains(searchPath, NSUserDomainMask, YES) lastObject];
32 char *ios_get_home(
void)
34 NSString *path = ios_get_directory_for_search_path(NSDocumentDirectory);
35 return strdup([path UTF8String]);
38 char *ios_get_temp(
void)
40 NSString *tmp_path = NSTemporaryDirectory();
41 return strdup([tmp_path UTF8String]);
44 char *ios_get_data(
void)
46 NSString *path = ios_get_directory_for_search_path(NSApplicationSupportDirectory);
47 return strdup([path UTF8String]);
50 char *ios_get_cache(
void)
52 NSString *path = ios_get_directory_for_search_path(NSCachesDirectory);
53 return strdup([path UTF8String]);