-
Notifications
You must be signed in to change notification settings - Fork 3
/
XcodeObject.h
29 lines (20 loc) · 880 Bytes
/
XcodeObject.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// XcodeObject.h XcodeProjReader
// Created by Alex Gray on 10/8/13.
#import <Cocoa/Cocoa.h>
@interface XcodeObject : NSObject <NSMutableCopying>
+ (instancetype) objectWithName:(NSString*)n
uuid:(NSString*)uuid;
- (void) setObject:(id)x
forKeyedSubscript:(id<NSCopying>)k;
- (id) objectForKeyedSubscript:(id)k;
@property (copy) NSString * uuid, * name;
@property (readonly) NSImage * icon;
@property (readonly) NSString * humanUTI;
@property NSMutableArray * children;
@property id parent;
@end
NS_INLINE NSString* humanReadableFileTypeForFileExtension (NSString *extension) {
CFStringRef fileUTI = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)extension, NULL);
NSString *utiDescription = (__bridge NSString*)UTTypeCopyDescription(fileUTI);
return CFRelease(fileUTI), utiDescription;
}