Reputation: 157
I need to read all the files of a directory and it have to be in Haskell but I didn`t find any material about read all files Can someone help me?
Upvotes: 1
Views: 3259
Reputation: 12106
See http://www.haskell.org/ghc/docs/6.12.2/html/libraries/directory-1.0.1.1/System-Directory.html#v%3AgetDirectoryContents, which will list all the files in a directory for you. Then, you can use the standard Haskell IO functions to read the file. Add more to the question if you need anything more specific.
Upvotes: 2
Reputation: 229563
You can use readFile
to read a file, and getDirectoryContents
to list the files in a directory.
Upvotes: 10