timotheecour / Nim

Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in that order of priority).
http://nim-lang.org/
Other
2 stars 0 forks source link

add `os.getDataDir` for platform independent `XDG_DATA_HOME` #744

Open timotheecour opened 3 years ago

timotheecour commented 3 years ago

(analog to getTempDir and getConfigDir in std/os)

refs https://github.com/nim-lang/Nim/pull/18119#issuecomment-850806138

links

juancarlospaco commented 3 years ago

Would it be better to make something like func getXdg*(items = {XdgHome, XdgData, XdgTemp})

Because theres multiple paths in XDG_*; Then the pre-existent proc can be a template getHome*() = getXdg({XdgHome}).

timotheecour commented 3 years ago

but XDG doesn't translate to windows; that's why we're going for these instead: getHomeDir getTempDir getConfigDir getCacheDir getDataDir (no PR yet for this)

juancarlospaco commented 3 years ago

Are you sure ?. 🤔