Description
I'm currently on JVM and I am using PreferencesSettings.Factory
with Preferences.userRoot()
. The key/value pairs are written into $HOME/Library/Preferences/com.apple.java.util.prefs.plist
. Other apps are also writing into this file though so you could potentially overwrite values. This can be solved by something like Preferences.userRoot().node("com.my.app.id)
. This brings me to my second point though that clearing them is tricky. My app also has a database and local files all of which are saved in a folder of mine. I'd like my settings to be also stored in that exact same directory, that way all the data belongs together. Clearing all the data manually, is easy since I just need to delete the directory.
Therefore I'd like to see a FileSettings
implementation that writes the key/value pairs to a File
. The implementation could be just 100% what Android does with SharedPreferences. So an XML file, a FileSettings.Factory
method where if you pass a name you get a different xml file.