22 Jun
2004
22 Jun
'04
9:32 a.m.
Hi,
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: http://haskell.org/onlinereport/directory.html getDirectoryContents :: FilePath -> IO [FilePath] A FilePath is just a String. John Hughes