Code: Select all
#import <Foundation/Foundation.h>
FString GetAppDataPath()
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
NSString *directory = [paths objectAtIndex:0];
return [directory UTF8String];
}
FString GetResourcesPath()
{
return [[[NSBundle mainBundle] resourcePath] UTF8String];
}
_mental_, are you looking at this or do you want me to do it?
Edit: probably better mental does it because I'm not sure I can tell on the Apple docs which versions introduced that function and its alternatives on NSFileManager.