Getting unknown UTI Identifiers

Hi,
in an app of mine I needed the UTI Identifier of files created by Pages app.
Then googling around I found that using Terminal it’s easy to get the UTI Identifier of any file:

mdls -name kMDItemContentTypeTree filename

where the UTI Identifier is the first item returned.

Usually, I search for “Uniform Type Identifier” in the apple developer web site.

Also you can look at: https://en.wikipedia.org/wiki/Uniform_Type_Identifier
(few info).

Path, not filename and place it between quotes if there is a space in it.

Result for a xojo (binary) project file:

kMDItemContentTypeTree = ( "com.xojo.project.binary", "com.xojo.project", "public.data", "public.item" )

Thank you Carlo.

@Emile Schwarz [quote]Path, not filename[/quote]

Thank you for pointing out my mistake.

BTW, usually I do not type the path; I just drop the file into Terminal and press Return.

I leaned my quota of new things today, thank you Carlo.

Nota: you already fullfilled yesterday’s too. :wink: