Module datastorage
Used for getting the directory paths that KoReader uses.
Usage:
local DataStorage = require("datastorage")
Functions
| DataStorage:getDataDir () | Gets the path where configuration/data is stored for KoReader. |
| DataStorage:getHistoryDir () | (Deprecated) Gets the path where legacy/obsolete sidecar files are stored. |
| DataStorage:getSettingsDir () | Gets the path where luasettings should be stored. |
| DataStorage:getDocSettingsDir () | Gets the path where docsettings (sidecar files) should be stored although this directory isn't guaranteed to exist. |
| DataStorage:getDocSettingsHashDir () | Gets the path where docsettings (sidecar files) should be stored although this directory isn't guaranteed to exist. |
| DataStorage:getFullDataDir () | Gets the full configuration/data path. |
Functions
- DataStorage:getDataDir ()
-
Gets the path where configuration/data is stored for KoReader.
Returns:
-
string
Directory path
- DataStorage:getHistoryDir ()
-
(Deprecated) Gets the path where legacy/obsolete sidecar files are stored.
Returns:
-
string
Directory path
- DataStorage:getSettingsDir ()
-
Gets the path where luasettings should be stored.
Returns:
-
string
Directory path
- DataStorage:getDocSettingsDir ()
-
Gets the path where docsettings
(sidecar files) should be stored although this directory isn't guaranteed to exist.
Returns:
-
string
Directory path
- DataStorage:getDocSettingsHashDir ()
-
Gets the path where docsettings
(sidecar files) should be stored although this directory isn't guaranteed to exist.
This is used instead of DataStorage:getDocSettingsDir when hashing is enabled.
Returns:
-
string
Directory path
- DataStorage:getFullDataDir ()
-
Gets the full configuration/data path.
Returns:
-
string
Directory path (e.g., /mnt/onboard/.adds/koreader)