1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-03 23:19:22 +02:00
Files
vcmi/lib/CIOSUtils.m
Andrey Filipenkov 8249171066 implement VCMIDirs
2022-09-24 15:55:16 +03:00

25 lines
891 B
Objective-C

/*
* CIOSUtils.m, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#import "CIOSUtils.h"
@import Foundation;
static const char *standardPath(NSSearchPathDirectory directory)
{
return [NSFileManager.defaultManager URLForDirectory:directory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:NULL].path.UTF8String;
}
const char *ios_documentsPath() { return standardPath(NSDocumentDirectory); }
const char *ios_cachesPath() { return standardPath(NSCachesDirectory); }
const char *ios_bundlePath() { return NSBundle.mainBundle.bundlePath.UTF8String; }
const char *ios_frameworksPath() { return [NSBundle.mainBundle.bundlePath stringByAppendingPathComponent:@"Frameworks"].UTF8String; } // TODO: sharedFrameworksPath?