[Haskell-cafe] How to determine if a FilePath is a directory name or regular file?

Erik de Castro Lopo mle+hs at mega-nerd.com
Mon Jun 22 02:16:55 EDT 2009

Colin Paul Adams wrote:

> I've been hoogling like bad to try to determine if a function like
> this exists.
> getDirectoryContents returns sub-directories as well as file names. I
> want only the latter, so I'm looking for a suitable filter.

The first example in this chapter of Real World Haskell uses the
doesDirectoryExist function :


Erik de Castro Lopo

More information about the Haskell-Cafe mailing list