[Haskell] Reading a directory tree
rjmh at cs.chalmers.se
Tue Jun 22 05:32:42 EDT 2004
> I'm looking for a way to iteratively read all the files in a directory and
> its subdirectories, given the filepath of the top-level dir.
> For example, I want to find a file, corresponding to a given filename, in
> a directory and its subdirectories.
getDirectoryContents is your friend. It's a function in the standard
library Directory, documented here:
getDirectoryContents :: FilePath -> IO [FilePath]
A FilePath is just a String.
More information about the Haskell