Module luadata

Handles append-mostly data such as KOReader's bookmarks and dictionary search history.

Functions

LuaData:open (file_path, o) Creates a new LuaData instance.
LuaData:saveSetting (key, value) Saves a setting.
LuaData:delSetting (key) Deletes a setting.
LuaData:addTableItem (table_name, value) Adds item to table.
LuaData:removeTableItem (key, index) Removes index from table.
LuaData:append (data) Appends settings to disk.
LuaData:reset (table) Replaces existing settings with table.
LuaData:flush () Writes all settings to disk (does not append).


Functions

LuaData:open (file_path, o)
Creates a new LuaData instance.

Parameters:

  • file_path luacheck
  • o ignore 312
LuaData:saveSetting (key, value)
Saves a setting.

Parameters:

  • key
  • value
LuaData:delSetting (key)
Deletes a setting.

Parameters:

  • key
LuaData:addTableItem (table_name, value)
Adds item to table.

Parameters:

  • table_name
  • value
LuaData:removeTableItem (key, index)
Removes index from table.

Parameters:

  • key
  • index
LuaData:append (data)
Appends settings to disk.

Parameters:

  • data
LuaData:reset (table)
Replaces existing settings with table.

Parameters:

  • table
LuaData:flush ()
Writes all settings to disk (does not append).
generated by LDoc 1.4.6 Last updated 2017-10-08 14:57:40