Is there a command line utility to which I can pass a filename, that will return applicable UTIs for that file?
hypothetical-uti-fetcher /Library/Desktop\ Pictures/Aqua\ Blue.jpg
might give me:
public.jpeg public.image public.data
You can use the
The mdls command only seems to work on Spotlight indexed files. If you run it on a mounted disk image, cd or thumb drive it may return no information at all. If the filetype's
http://uti.schwa.io/all has quite an extensive list of UTIs and is quite helpful. When you're developing a Quicklook Plugin it's also useful to use the following command to see what UTIs Quicklook thinks a file has and which plugins it uses for the preview: