file.Append

From GMod Wiki

(Redirected from Filex.Append)
Jump to: navigation, search
Function
Syntax file.Append( String filename, String contents )
Where is this used?
Description:
Appends a file.
Returns: nil
Part of Library: filex
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=File.Append]File.Append [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" at the end of "my_mod/data.txt".
Used onNewerShared.png
Code
file.Write("my_mod/data.txt","Yaaargh")
file.Append("my_mod/data.txt", "This is a test")
print( file.Read("my_mod/data.txt") )
OutputPrints "YaaarghThis is a test".


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox