From Garry's Mod
Revision as of 03:07, 24 July 2016 by Zerf
Returns the file's size in bytes. If the file is not found, returns -1.
The file's name.
The path type.
- "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.
Prints the size of helloworld.txt.
print( file.Size("helloworld.txt", "DATA") )