[FEATURE]-Add methods for reading and writing files.
Is your feature request related to a problem? Please describe. I would like helper methods to read and write files other than the essentials config. Plugins should have a decent reference for this functionality without having to recreate the logic each time.
Describe the solution you'd like A method to search for files by path/name A method that will return the data from a text file A method that will write a text file when passed data and a path.
If something to implement as part of the core I would vote for decent config sharing, lookup, merging and deserialization functionality is needed. While running multiple S#Pro programs I found need for:
- Automatic config resolution per slot - when same plugin loaded into two or more program slots, right config should be picked.
- Global and per-slot settings - ability to read global config and merge it with per slot config.
- Automatic traversal - check program running folder, switch to other common areas where config can be located, i.e. check program0x first, check nvram, check user, etc...
- Return as c# objects? I.e. read, merge, parse and instantiate config objects hiding file lookup, parsing from json, merge, de-serialize final config object....
Basically my two cents... I did something like that in https://github.com/uoftdaniels/ConfigManagementLibrary
I really hope something like that can be implemented at core level for Essentials as well - so we can have global config and per room customizations... Right now I believe it is possible only at portal level where merge is happening....
@batourin that all sounds and looks great. I think maybe its a couple of iterations past this initial request. I encourage you to keep evolving this initial feature, or submitting your libraries as a separate feature request.