Revision Difference
file.Size#515080
<function name="Size" parent="file" type="libraryfunc">⤶
<description>Returns the file's size in bytes. If the file is not found, returns -1.</description>⤶
<realm>Shared and Menu</realm>⤶
<args>⤶
<arg name="fileName" type="string">The file's name.</arg>⤶
<arg name="path" type="string">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.</arg>⤶
</args>⤶
</function>⤶
⤶
<example>⤶
<description>Prints the size of `helloworld.txt`.</description>⤶
<code>print( file.Size("helloworld.txt", "DATA") )</code>⤶
<output>8</output>⤶
⤶
</example>