-
Notifications
You must be signed in to change notification settings - Fork 0
pos.Config
Peter edited this page Mar 19, 2024
·
1 revision
Config access class
Creates a config object
-
path: string
- Path to the config file -
default?: table
- (Optional) Default config values -
createDef?: boolean
- (Optional) If the file does not exits, create default config at path
Variable | Description |
---|---|
path: string |
Path to normal config file |
data: table |
Config data |
default: table |
Default config data |
loaded: boolean |
If the config has been loaded from file |
Signature | Return | Description |
---|---|---|
__init__(path, default, createDef?) |
nil |
PACKAGE Initialize the config object |
load(path?) |
boolean |
Load the config from file |
loadDef(path?) |
boolean |
Load the config from file, or create a default one at the path |
save(path?) |
boolean |
Saves the config to file |
saveAll(path?) |
boolean |
Saves the config, including default values, to file |
Queue:__init__(path: string, default: table, createDef?: boolean): nil
PACKAGE
Initialize the config object
-
path: string
- Path to the config file -
default: table
- Default config values -
createDef?: boolean
- (Optional) If the file does not exits, create default config at path
Queue:load(path?: string): boolean
Load the config from file
-
path?: string
- (Optional) Temporary path to load config from
loaded: boolean
Queue:loadDef(path?: string): boolean
Load the config from file, or create a default one at the path
-
path?: string
- (Optional) Temporary path to load config from
loaded: boolean
Queue:save(path?: string): boolean
Saves the config to file
-
path?: string
- (Optional) Temporary path to save config to
saved: boolean
Queue:saveAll(path?: string): boolean
Saves the config, including default values, to file
-
path?: string
- (Optional) Temporary path to save config to
saved: boolean