Created
April 4, 2015 00:47
-
-
Save slogsdon/ad72fbeb54d572c9332a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Temp where | |
import System.Directory | |
path :: String | |
path = "/Users/shane.logsdon/Code/haskell/slogsdon.com/provider/posts/" | |
files :: IO [FilePath] | |
files = getDirectoryContents path | |
filterDirs :: [FilePath] -> [FilePath] | |
filterDirs = filter notCurrentPrevious | |
where | |
notCurrentPrevious f | |
| f `elem` [".", ".."] = False | |
| otherwise = True | |
getFilesContents :: [FilePath] -> IO [String] | |
getFilesContents = mapM (readFile . (path ++)) . filterDirs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment