Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the (likely) on-disk location of settings clearly #135

Open
chris-hatton opened this issue Dec 18, 2022 · 1 comment
Open

Document the (likely) on-disk location of settings clearly #135

chris-hatton opened this issue Dec 18, 2022 · 1 comment

Comments

@chris-hatton
Copy link

chris-hatton commented Dec 18, 2022

I'm using the JVM target on macOS, with no-arg Settings() API and despite following up the documentation for Preferences.userRoot() I am unable to find where the settings are stored on disk. This is really important for development, to be able to inspect/backup/clear them etc. Suggest this would make a valuable improvement to the docs.

Edit: This is actually driving me nuts(!) The settings are persisting between runs alright, I just can't find where they are! Inspecting the Preferences object in debugger doesn't enlighten much either, giving an absolutePath of /, but I wouldn't expect that App to be successfully writing to the root of my drive, and sure enough it isn't. Tried lsof but can't catch the App in the act of accessing the plist. I'm going to have to switch to using the arg-ful constructor for Settings just to be able to specify the file location.

@russhwolf
Copy link
Owner

I'd rather defer to the backing API documentation than redocument it and risk introducing errors or confusion.

You're almost certainly better off not using no-arg if you care about these details. But it is (apparently) possible to supply a custom PreferencesFactory which might allow you to pass whatever customization you need. See notes at the end of the Preferences javadoc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants