Hacker News new | ask | show | jobs
by pasc1878 301 days ago
Adding a library for that is not overkill but just being polite to your users setting files where the OS suggests and not putting your ideas there,
1 comments

Adding a library has nothing to do with that. You can implement it yourself in a few lines of code, especially if you only need one path, like configs. You do need to research for caveats (e.g. check $XDG_CONFIG_HOME on Linux and not just put it into ~/.config) but it’s not rocket science.

And if you choose to just trust library authors, you are putting their ideas there instead. There’s that Rust crate that uses XDG on macOS, for example.