Skip to content

Commit

Permalink
+uniformTypeWithIdentifier:
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeabdullah committed Apr 2, 2012
1 parent ff43ae0 commit a9050a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions KSUniformType.h
Expand Up @@ -31,6 +31,7 @@

+ (id)uniformTypeWithFilenameExtension:(NSString *)extension;
+ (id)bestGuessUniformTypeForURL:(NSURL *)url;
+ (id)uniformTypeWithIdentifier:(NSString *)identifier;

// KSUniformType returns the right to return nil should the identifier be unsuitable (a la NSURL). This doesn't happen at present though
// Designated initializer
Expand Down
5 changes: 5 additions & 0 deletions KSUniformType.m
Expand Up @@ -180,6 +180,11 @@ + (id)uniformTypeWithFilenameExtension:(NSString *)extension;
return [[[self alloc] initWithIdentifier:[self typeForFilenameExtension:extension]] autorelease];
}

+ (id)uniformTypeWithIdentifier:(NSString *)identifier;
{
return [[[self alloc] initWithIdentifier:identifier] autorelease];
}

+ (id)bestGuessUniformTypeForURL:(NSURL *)url;
{
return [[[self alloc] initWithIdentifier:[self typeOfFileAtURL:url]] autorelease];
Expand Down

0 comments on commit a9050a5

Please sign in to comment.