file.IsDir

From GMod Wiki

Jump to: navigation, search
Function
Syntax file.IsDir( String filename, [ Boolean usebasefolder ] )
Where is this used?
Description:
Checks if a filename is a folder or a file
Returns: Boolean
Part of Library: File
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=File.IsDir]File.IsDir [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionThis example checks if "my_mod" is a folder, and if not creates it.
Used onNewerServer.png
Code
if (not file.IsDir("my_mod")) then
    file.CreateDir("my_mod")
end
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox