mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-27 16:31:31 +00:00
21 lines
526 B
Mathematica
21 lines
526 B
Mathematica
|
//
|
||
|
// NSBundle+DataResource.m
|
||
|
// Clock Signal
|
||
|
//
|
||
|
// Created by Thomas Harte on 02/10/2016.
|
||
|
// Copyright © 2016 Thomas Harte. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import "NSBundle+DataResource.h"
|
||
|
|
||
|
@implementation NSBundle (DataResource)
|
||
|
|
||
|
- (NSData *)dataForResource:(NSString *)resource withExtension:(NSString *)extension subdirectory:(NSString *)subdirectory
|
||
|
{
|
||
|
NSURL *url = [self URLForResource:resource withExtension:extension subdirectory:subdirectory];
|
||
|
if(!url) return nil;
|
||
|
return [NSData dataWithContentsOfURL:url];
|
||
|
}
|
||
|
|
||
|
@end
|