Garry's Mod Wiki

Revision Difference

file_class#519258

<cat>classfunc</cat> <title>File</title> The file library provides functions for finding, reading and writing to files. ⤶ ⤶ The following path values are most commonly used:⤶ * “LUA” searches the lua files (in /lua/, in your gamemodes, in all the addons).⤶ * “GAME” searches all the mounted content (main folder, addons, mounted games etc).⤶ * “MOD” searches only the garrysmod folder.⤶ * “DATA” searches in the data folder.⤶ For the full list of path values, type “path” in the console.This is the file object. It used used primarily to read or write binary data from files. ⤶ The object is returned by <page>file.Open</page>.