finding ....

Thomas Hallgren hallgren@cse.ogi.edu
Tue, 19 Mar 2002 17:05:25 -0800


Hi,

The standard library module Directory contains

    doesFileExist :: FilePath -> IO Bool

See http://www.haskell.org/onlinelibrary/directory.html

Regards,
Thomas Hallgren

PS If using doesFileExist is a bad idea, then using some of the other 
functions from the module Directory, e.g. getDirectoryContents, is 
probablya bad idea too...

Lennart Augustsson wrote:

>Using such a function is generally a bad idea because of race conditions.
>
>    -- Lennart
>
>Diego Yanivello wrote:
>
>>hi,    is there (in Haskell) a function like        existFile :: FilePath ->
>>IO (Bool) ? Thanks!
>>