-
Notifications
You must be signed in to change notification settings - Fork 7
/
MacHelperFunctions.m
21 lines (18 loc) · 762 Bytes
/
MacHelperFunctions.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//
// MacHelperFunctions.mm
// Skyrocket
//
// Created by Nick Zitzmann on 2/25/06.
// Copyright 2006 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MacHelperFunctions.h"
const char *PathForResourceOfType(const char *resourceName, const char *type)
{
NSString *resourceNameString = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:resourceName length:strlen(resourceName)];
NSString *typeString = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:type length:strlen(type)];
NSString *path = [[NSBundle bundleWithIdentifier:@"com.reallyslick.Skyrocket"] pathForResource:resourceNameString ofType:typeString];
if (path)
return [path fileSystemRepresentation];
return NULL;
}