Garry's Mod Wiki

Garry's Mod Wiki

  number file.Size( string fileName, string gamePath )


Returns the file's size in bytes.


1 string fileName
The file's name.
2 string gamePath
The path to look for the files and directories in. See this list for a list of valid paths.


1 number
The file size in bytes, or -1 if the file is not found.


Prints the size of helloworld.txt.

print( file.Size("helloworld.txt", "DATA") )
Output: 8

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...