diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2015-03-29 17:49:38 +0900 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2015-03-29 17:49:38 +0900 |
commit | d3763e664f385059940ec6da1fb9f823a7cf6048 (patch) | |
tree | 34296cc74616cdb06bb9464e8afb5931147e51b8 | |
parent | 55d150f84f3cc9d834c2c9aca3f377c35de8d626 (diff) | |
download | srem-d3763e664f385059940ec6da1fb9f823a7cf6048.tar.gz |
config function to get cache directory location
-rw-r--r-- | src/Control/SremConfig.hs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Control/SremConfig.hs b/src/Control/SremConfig.hs index ef62cbe..eea067b 100644 --- a/src/Control/SremConfig.hs +++ b/src/Control/SremConfig.hs @@ -1,4 +1,13 @@ -module Control.SremConfig where +module Control.SremConfig ( getCacheDirectory + , intervals + ) where + +import System.Directory (getHomeDirectory) +import System.FilePath ((</>)) + +getCacheDirectory :: IO FilePath +getCacheDirectory = getHomeDirectory >>= \h -> + return $ h </> ".cache" </> "srem" intervals :: [Int] intervals = [60, 15, 0] |