// // NSString+NGAUTIAdditions.m // P4Menu // // Created by Michael Bishop on 1/13/12. // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // #import "NSString+NGAUTIAdditions.h" @implementation NSString (NGAUTIAdditions) -(BOOL)conformsToUTI:(NSString*)uti { return UTTypeConformsTo((CFStringRef)self, (CFStringRef)uti); } -(NSDictionary*)UTIDeclaration { return [(NSDictionary*)UTTypeCopyDeclaration((CFStringRef)self) autorelease]; } -(NSURL*)UTIDeclaringBundleURL { return [(NSURL*)UTTypeCopyDeclaringBundleURL((CFStringRef)self) autorelease]; } -(NSString*)UTIDescription { return [(NSString*)UTTypeCopyDescription((CFStringRef)self) autorelease]; } -(NSString*)UTIPreferredTagWithClass:(NSString*)classString { return [(NSString*)UTTypeCopyPreferredTagWithClass((CFStringRef)self, (CFStringRef)classString) autorelease]; } -(NSArray*)UTIAllIdentifiersForTag:(NSString*)tag conformingToUTI:(NSString*)uti { return [(NSArray*)UTTypeCreateAllIdentifiersForTag((CFStringRef)self, (CFStringRef)tag, (CFStringRef)uti ) autorelease]; } -(NSString*)UTIPreferredIdentifiersForTag:(NSString*)tag conformingToUTI:(NSString*)uti; { return [(NSString*)UTTypeCreatePreferredIdentifierForTag((CFStringRef)self, (CFStringRef)tag, (CFStringRef)uti ) autorelease]; } -(OSType)OSType { return UTGetOSTypeFromString((CFStringRef)self); } +(NSString*)UTIForOSType:(OSType)osType; { return [(NSString*)UTCreateStringForOSType(osType) autorelease]; } @end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 20722 | jdputsch | initial branch, prep for -Zapp= support | ||
//guest/michael_bishop/MacMenu/src/NGAUtilities/Source/NSString+NGAUTIAdditions.m | |||||
#1 | 8331 | Matt Attaway |
Adding initial version of MacMenu for Perforce MacMenu is a helpful Perforce client that sits in your toolbar. It allows you to run standard Perforce operations on the document that is open the currently active editor/viewer. |