How can you convert a filename extension string (like png) to a Uniform Type Identifier (like public.png)?
I'm looking for a general purpose script or utility, not anything like mdls -name kMDItemContentTypeTree <file>.
|
How can you convert a filename extension string (like I'm looking for a general purpose script or utility, not anything like |
||||
|
|
|
Easiest way to do that is to use
Compiled Usage:
("unknown" file extensions are mapped to UTIs that begin with the |
|||
|
|
|
In case this is primarily about convenience (I'm willing to delete though):
Usage:
|
|||
|
getuti
Usage
|
||||
|
|