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

Add support for XDG paths? #18

Open
Martinsos opened this issue Jun 18, 2021 · 0 comments
Open

Add support for XDG paths? #18

Martinsos opened this issue Jun 18, 2021 · 0 comments

Comments

@Martinsos
Copy link
Member

Martinsos commented Jun 18, 2021

Right now, if you want to use some XDG dir in StrongPath manner, you would do smth like this:

data UserHomeDir
data XdgDataDir

getXdgDataDir :: IO (Path System Abs (Dir XdgDataDir))
getXdgDataDir = fromJust $ parseRelDir $ System.Directory.getXdgDirectory System.Directory.XdgData ""

We could add functions like this directly into StrongPath! Let's say in StrongPath.Xdg module?
Another option, in case we don't want to bloat package with stuff like this, is to put it in a separate package: strong-path-xdg. Or strong-path-extra.

This idea came as a suggestion from @4caraml .

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

1 participant