Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting extensions of a given UTType

I know I can get the UTType of a given extension using UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, extension, NULL) but I can't find a way to do the opposite, that is an array of extensions for a given UT... What can I do?

Thank you

like image 762
user732274 Avatar asked May 10 '12 17:05

user732274


1 Answers

UTTypeCopyPreferredTagWithClass is used to convert a UTI to another tag, like file extensions:

NSString *extension = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass(myUTI, kUTTagClassFilenameExtension);
like image 63
Nikolai Ruhe Avatar answered Nov 01 '22 12:11

Nikolai Ruhe