Constructor
new FsUtil(dirPath)
Parameters:
Name | Type | Description |
---|---|---|
dirPath |
string | Path to directory where to write data to, defaults to /data (from project root). |
- Version:
-
- 1.0
- Source:
Methods
readData()
Read all data file from the storage directory and build an object.
Example:
/data
users.json
storage.json
results in following object: {"users": {}, "storage": {}}
- Source:
writeData(filename, data)
Write new data to the storage directory.
Parameters:
Name | Type | Description |
---|---|---|
filename |
string | The name of the file to be written. |
data |
Object | Write data to the files in the |
- Source:
(static) createDefaultConfig()
Set a default configuration file if non exists, only for unit tests.
- prefix: /
- token needs to be set
- default admin Role "Bot Admin"
- allow communication on channels
- Source: