-
Notifications
You must be signed in to change notification settings - Fork 30
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
Manually create a xdg::BaseDirectories value #44
Comments
This seems useful. I'm happy to merge a PR adding a new constructor creating a mock BaseDirectories value. (Something like |
I started having a go at writing this and I'm having trouble coming up with an interface that isn't kind of ugly for the I think probably the best approach is either to make the fields public, or use some sort of builder pattern. The builder pattern would probably look something like:
I'm leaning towards just making the fields public, and possibly adding a convenience method to build an "clean" instance. Something like:
@whitequark - thoughts? |
Looking at the current code, there already exists the This would also allow thing like |
Is there any downside at all to making the fields public? |
But this looks sensible to me as well. |
About making the fields public, I'm not opposed to that it's just I don't know how the "prefix" fields interact with the other ones. Are there any invariants of any kind that should be upheld? |
I don't quite remember, I wrote this code many many years ago originally... |
I'd like to mock some data for testing. I tried modifying environment variables at first but this failed because other parts of the application do rely on the real paths still being present
The text was updated successfully, but these errors were encountered: