file.FindInLua
From GMod Wiki
Function | |
Syntax |
file.FindInLua( String filename ) Where is this used? |
Description: | |
Find a list of files within the Lua directory (also searches cache for the file) | |
Returns: | Table (list of filenames, which are strings) |
Part of Library: | File |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=File.FindInLua]File.FindInLua [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | This example finds all the Lua files in the toolgun's "stools" folder. |
---|---|
Used on | |
Code | local list = file.FindInLua("weapons/gmod_tool/stools/*.lua") for _, file in pairs(list) do print(file) end |
Output | The names of the Lua files of all tools you have installed. |