GetFileIDFromPath

From Warcraft Wiki
Jump to navigation Jump to search

Returns the FileID for an Interface file path.

fileID = GetFileIDFromPath(filePath)

Arguments

filePath
string - The path to a game file. For example Interface/Icons/Temp.blp

Returns

fileID
number : FileID - The internal ID corresponding to the file path. Negative integers are temporary IDs; these are not specified in the CASC root file and may change when the client is restarted.

Example

Interface/ path

/dump GetFileIDFromPath("Interface/Icons/Temp") -- 136235

Custom file path

/dump GetFileIDFromPath("Interface/testimg.jpg") -- -1163
/dump GetFileIDFromPath("hello/test.jpg")        -- -2

Patch changes

Battle for Azeroth Patch 8.2.0 (2019-06-25): No longer works for non-interface Blizzard file paths. [1]
Legion Patch 7.0.3 (2016-07-19): Added.

References