file.FindDir

From GMod Wiki

Revision as of 11:20, 15 October 2011 by TheFreeman193 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=File.FindDir]File.FindDir [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionThis example lists all of the folders in the my_mod directory
Used onNewerShared.png
Code
local list = file.FindDir("my_mod/*")
for _, dir in pairs(list) do
   Msg( dir )
end
 
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox