file.Write

From GMod Wiki

Jump to: navigation, search
Function
Syntax file.Write( String filename, String contents )
Where is this used?
Description:
Write to a specified file
Returns: nil
Part of Library: File
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=File.Write]File.Write [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Info 64.png You can only read/write text data. Binary data is not mutable inside Garry's Mod using the File library.
Info 64.png Your filenames MUST end in .txt

Examples

DescriptionThis example writes "This is a test" to the my_mod/data.txt
Used onNewerShared.png
Code
file.Write("my_mod/data.txt", "This is a test")
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox