Talk:File.Read

From GMod Wiki

Jump to: navigation, search

The filename does not have to end in .txt, this code will print the contents of garrysmod.fgd to the console:

local contents = file.Read("../garrysmod.fgd")
Msg(contents .. "\n")

--Ihenry 14:37, 10 December 2006 (GMT Standard Time)

^^ Doesn't work since the last update --Ihenry 19:20, 13 December 2006 (GMT Standard Time)

It's true, you can open any file that's not .lua, testing with html, cfg, vdf, db. Jake 23:01, 14 May 2007 (GMT-5)

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox