This function is used to retrieve all extensions the editor supports for a file category, either natively or through the use of a plugin.
table GetFileExtensions(number category, boolean save = false)
Parameter | Description |
---|---|
category | can be any combination of the constants below |
save | true for file extensions that can be saved or false for file extensions that can be opened |
Returns a table containing the requested file extensions in an array configuration.
The following constants can be combined in the category parameter:
local extensions = GetFileExtensions(FILECATEGORY_MODEL | FILECATEGORY_TEXTURE)
for n = 1, n <= #extensions do
Print(extensions[n])
end