From Garry's Mod
Revision as of 15:51, 4 August 2016 by Mr Wilson
Returns a boolean of whether the file or directory exists or not.
The file or directory's name.
The path of where to look for the file.
- "GAME" Structured like base folder (garrysmod/), searches all the mounted content (main folder, addons, mounted games etc)
- "LUA" or "lsv" - All Lua folders (lua/) including gamesmodes and addons
- "DATA" Data folder (garrysmod/data)
- "MOD" Strictly the game folder (garrysmod/), ignores mounting.
Returns true if the file exists and false if it is not.
Prints whether the data folder exists in the base directory.
print( file.Exists("data", "GAME") )