Identifying Libraries with Dictionaries

Is it safe to assume that any library file with a “.sdef” file inside has a dictionary?

You can always test at run-time, but the root element of an sdef is defined as a dictionary here:

https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_creating_sdef/SAppsCreateSdef.html#//apple_ref/doc/uid/TP40001979-SW7

Yes. There’s no other reason for adding one.

I have a script that opens a library’s dictionary form a list. Now I test for the .sdef file so only libraries with dictionaries are displayed.