In most cases, yes. But I can think of exceptions
I think GetInfo runs off the Type and Creator Code. If the file has
come in from a PC running Office 2007, for example, these will be
unrecognisedunless the user has installed the Office Open XML
Converter.
Type and creator codes are still in use, but overall they are a thing
of the past preceded with the extensions. More or less all files have
extensions now (though they might be hidden sometimes) and the System
stores the association between extensions and applications in a big
central database called the LaunchService database.
Sometimes, two applications claim the same extension (I've seen that
with Excel and Stuffit expander both claiming .bon for instance) and
usually in these cases, the app you installed the latest precedes the
other one.
Sometimes, the database can become corrupted. The only way out is to
trash the database (Onyx can do that for you) and let the System
progressively rebuild it as you launch the applications over time (some
files might lose their application icon until the database is fully
rebuild but this is of no consequences other than cosmetic).
Sometimes, the System has simply never seen the extension and has to
make a guess (not always a good one) - this is what John is referring
to with the .docx or .xlsx extensions.
Having the app on your Mac (eg: the Office XML converter) is not always
enough. You need to launch the app at least once to have the file types
registered in the LaunchService database.
Command-I provides a lot of information in this regard and can help you
re-associate an extension to the app you want (and extend the setting
to all files with the same extension),
Corentin