file.FindDir
From GMod Wiki
Function | |
Syntax |
file.FindDir( String dirname, [ Boolean usebasefolder ] ) Where is this used? |
Description: | |
Find a list of directories within a directory | |
Returns: | Table (folder names, which are strings) |
Part of Library: | File |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=File.FindDir]File.FindDir [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | This example lists all of the folders in the my_mod directory |
---|---|
Used on | |
Code | local list = file.FindDir("my_mod/*") for _, dir in pairs(list) do Msg( dir ) end |
Output | N/A |
Additional Notes
- Relative to garrysmod/data.
- If usebasefolder is true then it starts relative to the GMod base folder (garrysmod/garrysmod).