Skip to content

IO

The IO library contains wrapper methods for loading and saving files, automatically serializing/deserializing tables into/from json.

InputOutputLib Class

Methods

LoadFile
function InputOutputLib.LoadFile(filename, context, raw)
   -> any

Loads a file.

@param filename string

@param context (InputOutputLib_UserFileContext)? Defaults to "user"

@param raw boolean? Defaults to false.

SaveFile
function InputOutputLib.SaveFile(filename, contents, raw, clean)

Serializes contents into json and saves them to a file.

@param filename string

@param contents any

@param raw boolean? Defaults to false.

@param clean boolean? Defaults to false. Calls table.clean() on the contents.