11#include "glue_macos.h"
12#import <Foundation/Foundation.h>
19 BOOL ok = [str getCString:res
21 encoding:NSUTF8StringEncoding];
30 NSString *path = [[NSBundle mainBundle] bundlePath];
31 return [path hasSuffix:@".app"] ? 1 : 0;
39 NSString *path = [[NSBundle mainBundle] resourcePath];
53 ] componentsJoinedByString:@""];
static int macos_writeString(NSString *str, char *res, size_t n)
Write an NSString to a C buffer.
int macos_resourcesPath(char *res, size_t n)
Get the path to the bundle resources directory.
int macos_isBundle(void)
Determine if we're running from inside an app bundle.
int macos_cachePath(char *res, size_t n)
Get the cache directory path.
static int macos_userLibraryDir(NSString *kind, char *res, size_t n)
Get the path to the specified user directory.
int macos_configPath(char *res, size_t n)
Get the config directory path.