Skip to content

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented May 30, 2021

from reading at various reference materials, this seems like the most commonly accepted setting overall

example use case

links

when defined(windows):
getCacheDir() / app / "cache"
else:
getCacheDir() / app
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that just the 1st overload is Ok, the user can make getCacheDir() / "app" themselves, but is just my opinion...

Copy link
Member Author

@timotheecour timotheecour May 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that would not be correct for windows; that's the point of this proc, make it portable (other libraries do this too)

@timotheecour
Copy link
Member Author

PTAL

@Araq Araq merged commit 9559350 into nim-lang:devel May 31, 2021
@timotheecour timotheecour deleted the pr_getCacheDir branch May 31, 2021 20:30
PMunch pushed a commit to PMunch/Nim that referenced this pull request Mar 28, 2022
* add `os.getCacheDir`

* fixup

* address comments
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

Successfully merging this pull request may close these issues.

5 participants