IconFileNames

About this addon

IconFileNames provides a table mapping icon file IDs to file names within the Interface/Icons directory. This can be useful when implementing file name-based icon search. All client flavors are supported.

If installed as a separate load on demand addon, the table is provided via the global ICON_FILE_NAMES variable. If used as an embedded library, the table is provided via the ICON_FILE_NAMES key in the addon's private table.

Example (Load on Demand)
local function GetIconFileName(fileID) if select(5, GetAddOnInfo("IconFileNames")) == "DEMAND_LOADED" and not IsAddOnLoaded("IconFileNames") then LoadAddOn("IconFileNames") end if type(ICON_FILE_NAMES) == "table" then return ICON_FILE_NAMES[fileID] end end print(GetIconFileName(132089)) -- ability_ambush
Example (Embedded)
local _, T = ... print(T.ICON_FILE_NAMES[132089]) -- ability_ambush